From ee546ef74474722be034731a639211dc121b4dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Poizat?= Date: Tue, 24 Feb 2026 10:55:21 +0100 Subject: [PATCH] Fix Scribe mobile inline never showing modal - The context.mounted check was placed after onTapFallback?.call() - The onTapFallback function calls controller.saveAndUnfocusForModal() which unfocuses the editor - This caused the context to become unmounted so the context.mounted check would return early - As a result the modal would never be show --- .../widgets/button/inline_ai_assist_button.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scribe/lib/scribe/ai/presentation/widgets/button/inline_ai_assist_button.dart b/scribe/lib/scribe/ai/presentation/widgets/button/inline_ai_assist_button.dart index d42d68605..d47193cf4 100644 --- a/scribe/lib/scribe/ai/presentation/widgets/button/inline_ai_assist_button.dart +++ b/scribe/lib/scribe/ai/presentation/widgets/button/inline_ai_assist_button.dart @@ -43,12 +43,10 @@ class InlineAiAssistButton extends StatelessWidget { size = renderBox.size; } - await onTapFallback?.call(); - - if (!context.mounted) return; - final isScribeMobile = AiScribeMobileUtils.isScribeInMobileMode(context); + await onTapFallback?.call(); + await AiScribeModalManager.showAIScribeModal( isScribeMobile: isScribeMobile, imagePaths: imagePaths,