Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
fix: url cell mobile (#4029)
Mathias Mogensen1e6762b424df
diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/database/card/row/cells/mobile_url_cell.dart b/frontend/appflowy_flutter/lib/mobile/presentation/database/card/row/cells/mobile_url_cell.dartindex ab1cd11989..2299d6003a 100644--- a/frontend/appflowy_flutter/lib/mobile/presentation/database/card/row/cells/mobile_url_cell.dart+++ b/frontend/appflowy_flutter/lib/mobile/presentation/database/card/row/cells/mobile_url_cell.dart@@ -26,6 +26,7 @@ class MobileURLCell extends GridCellWidget {class _GridURLCellState extends GridCellState<MobileURLCell> {late final URLCellBloc _cellBloc;+ final FocusNode _focusNode = FocusNode();@overridevoid initState() {@@ -39,6 +40,7 @@ class _GridURLCellState extends GridCellState<MobileURLCell> {@overrideFuture<void> dispose() async {_cellBloc.close();+ _focusNode.dispose();super.dispose();}@@ -51,6 +53,7 @@ class _GridURLCellState extends GridCellState<MobileURLCell> {builder: (context, content) {if (content.isEmpty) {return TextField(+ focusNode: _focusNode,keyboardType: TextInputType.url,decoration: InputDecoration(enabledBorder: InputBorder.none,@@ -62,11 +65,8 @@ class _GridURLCellState extends GridCellState<MobileURLCell> {// close keyboard when tapping outside of the text fieldonTapOutside: (event) =>FocusManager.instance.primaryFocus?.unfocus(),- onSubmitted: (value) {- _cellBloc.add(- URLCellEvent.updateURL(value),- );- },+ onSubmitted: (value) =>+ _cellBloc.add(URLCellEvent.updateURL(value)),);}@@ -92,9 +92,7 @@ class _GridURLCellState extends GridCellState<MobileURLCell> {autofocus: true,keyboardType: TextInputType.url,onEditingComplete: () {- _cellBloc.add(- URLCellEvent.updateURL(controller.text),- );+ _cellBloc.add(URLCellEvent.updateURL(controller.text));context.pop();},);@@ -115,5 +113,7 @@ class _GridURLCellState extends GridCellState<MobileURLCell> {}@override- void requestBeginFocus() {}+ void requestBeginFocus() {+ _focusNode.requestFocus();+ }}