diff --git a/CHANGELOG.md b/CHANGELOG.md index bd7684df..1d71ffe7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ their current selection (e.g. tap on a different word, create a new node, select * Fixed minor bug with automatic height adjustment on mobile * Added new `ToolbarType.nativeExpandable` which allows the user to switch between the scrollview or gridview toolbar on the fly +* Support setting the `inputmode` for the editor, which changes the virtual keyboard display on mobile devices (e.g. number pad, email keyboard, etc) * [BREAKING] renamed `onChange` callback to `onChangeContent` * [BREAKING] disabled a lot of the buttons by default, now only around half of the editor buttons are enabled to improve the UX. You can still re-enable the rest if you want. diff --git a/lib/src/widgets/html_editor_widget_mobile.dart b/lib/src/widgets/html_editor_widget_mobile.dart index b310240c..19786f93 100644 --- a/lib/src/widgets/html_editor_widget_mobile.dart +++ b/lib/src/widgets/html_editor_widget_mobile.dart @@ -373,7 +373,9 @@ class _HtmlEditorWidgetMobileState extends State { await controller.evaluateJavascript( source: "document.onselectionchange = onSelectionChange; console.log('done');"); - await controller.evaluateJavascript(source: "document.getElementsByClassName('note-editable')[0].setAttribute('inputmode', '${describeEnum(widget.htmlEditorOptions.inputType)}');"); + await controller.evaluateJavascript( + source: + "document.getElementsByClassName('note-editable')[0].setAttribute('inputmode', '${describeEnum(widget.htmlEditorOptions.inputType)}');"); if ((Theme.of(context).brightness == Brightness.dark || widget.htmlEditorOptions.darkMode == true) && widget.htmlEditorOptions.darkMode != false) { diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index 7dacfa47..7d5e6768 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -390,8 +390,7 @@ class _DropdownMenuState extends State<_DropdownMenu> { type: MaterialType.transparency, textStyle: route.style, child: ScrollConfiguration( - behavior: ScrollConfiguration.of( - context).copyWith( + behavior: ScrollConfiguration.of(context).copyWith( overscroll: false, physics: const ClampingScrollPhysics(), platform: Theme.of(context).platform,