diff --git a/flutter/lib/mobile/pages/remote_page.dart b/flutter/lib/mobile/pages/remote_page.dart index 838545d0c..49601ece3 100644 --- a/flutter/lib/mobile/pages/remote_page.dart +++ b/flutter/lib/mobile/pages/remote_page.dart @@ -275,7 +275,9 @@ class _RemotePageState extends State { return Offstage(); }(), _bottomWidget(), - gFFI.ffiModel.pi.isSet.isFalse ? emptyOverlay(MyTheme.canvasColor) : Offstage(), + gFFI.ffiModel.pi.isSet.isFalse + ? emptyOverlay(MyTheme.canvasColor) + : Offstage(), ], )), body: Overlay( @@ -316,12 +318,17 @@ class _RemotePageState extends State { Widget getRawPointerAndKeyBody(Widget child) { final keyboard = gFFI.ffiModel.permissions['keyboard'] != false; return RawPointerMouseRegion( - cursor: keyboard ? SystemMouseCursors.none : MouseCursor.defer, - inputModel: inputModel, - child: RawKeyFocusScope( - focusNode: _physicalFocusNode, - inputModel: inputModel, - child: child)); + cursor: keyboard ? SystemMouseCursors.none : MouseCursor.defer, + inputModel: inputModel, + // Disable RawKeyFocusScope before the connecting is established. + // The "Delete" key on the soft keyboard may be grabbed when inputting the password dialog. + child: gFFI.ffiModel.pi.isSet.isTrue + ? RawKeyFocusScope( + focusNode: _physicalFocusNode, + inputModel: inputModel, + child: child) + : child, + ); } Widget getBottomAppBar(bool keyboard) {