flutter-code-editor
flutter-code-editor copied to clipboard
Disable spell check in Firefox
See also:
- https://github.com/flutter/flutter/issues/40682
- https://github.com/flutter/flutter/issues/103342
Workarounds:
-
spellCheckConfiguration: const SpellCheckConfiguration.disabled(),
does not work. -
keyboardType: TextInputType.visiblePassword
works but it requires platform check.
TODO:
- Investigate what exactly triggers spellcheck in Firefox because the minimal app does not. Describe it here.
- File a bug in Flutter.
- Make a workaround, likely with
TextInputType.visiblePassword
.
As I checked, the reason behind spell check trigger is TextField.maxLines
property.
If it is set to something, even null
, the FireFox will activate the spell check.
As I see, there is no solution of removing some set property of the TextField
.
I am going to implement the workaround first, and then send the defect to the flutter team.
Setting keyboardType: TextInputType.visiblePassword
breaks the TextField
-> it becomes a single line.
I am investigating to find another workaround.
The dummiest thing to do is to set autocomplete="false"
with JavaScript on all textarea
s. This should be done in a timer every few seconds during the whole life of the app to guarantee it will not be cleared on rebuilds.
I created the corresponding issue in Flutter repo
- https://github.com/flutter/flutter/issues/122092