diff --git a/lib/ui/app/app_builder.dart b/lib/ui/app/app_builder.dart index 53f5299bc..1574b9462 100644 --- a/lib/ui/app/app_builder.dart +++ b/lib/ui/app/app_builder.dart @@ -136,7 +136,7 @@ class AppBuilderState extends State { child: widget.builder(context), focusNode: _focusNode, onKey: (event) { - if (kReleaseMode) { + if (true || kReleaseMode) { return; } print( diff --git a/lib/ui/app/entity_dropdown.dart b/lib/ui/app/entity_dropdown.dart index e3d16b0a8..f699c1212 100644 --- a/lib/ui/app/entity_dropdown.dart +++ b/lib/ui/app/entity_dropdown.dart @@ -36,16 +36,24 @@ class EntityDropdown extends StatefulWidget { class _EntityDropdownState extends State { final _textController = TextEditingController(); + final _focusNode = FocusNode(); @override void initState() { super.initState(); _textController.text = widget.initialValue; + _focusNode.addListener(() { + print('## DOCUS EVENT: hasFocus: ${_focusNode.hasFocus}##'); + if (_focusNode.hasFocus) { + _showOptions(); + } + }); } @override void dispose() { _textController.dispose(); + _focusNode.dispose(); super.dispose(); } @@ -74,6 +82,8 @@ class _EntityDropdownState extends State { onTap: () => _showOptions(), child: IgnorePointer( child: TextFormField( + focusNode: _focusNode, + readOnly: true, validator: widget.validator, autovalidate: widget.autoValidate, controller: _textController,