html-editor-enhanced
html-editor-enhanced copied to clipboard
New line not created immediately and cursor is still in same position.
Environment tested : Oneplus 6, android
steps to reproduce: focus at the end of the line, and press enter (return key) multiple times. cursor was still in same position. but gettext returns value with new lines.
After testing this extensively this is unfortunately just an issue with Android. Here are the details:
Summernote editor uses a property called keyCode to detect what was pressed. The key code for "enter" is 13, and when it sees that keycode, it adds the newline accordingly and moves the cursor down. The issue on Android is that before any key code it will always send "229" when autocorrect settings are activated on the keyboard. Sometimes right after 229 it will send "13" so the cursor changes the position, but a lot of the time it will not send "13". Thus the new line is not created. If you test with all autocorrect turned off, it works flawlessly every time.
I don't know if there is a workaround, I am trying to figure something out. Created https://github.com/summernote/summernote/issues/4074 to see if anyone has any ideas.
Same issue here, would love to get some help.
I have same problem
Are there any updates? This seems like a nice package but this bug is a not use this package in production type bug. Thank you!
@boinxi really sorry don't have anything new... I tried to mess around with the summernote JS the other day and couldn't get it to work. The only solution at the moment is to disable autocorrect on the keyboard, I don't know if you can do this through flutter. I also checked earlier if it was possible through the WebView but didn't find anything.
I think I may have to ditch summernote to fix some of the deeper issues and I'm also considering creating a fully native editor (with less features) using extended_text_field, but I don't know if it will be possible quite yet.
Thanks @tneotia . I hope it will go well eventually, flutter lacks a good rich text editor at the moment. wish you well!
Are there any updates? This package is the one that fit perfectly for my project. I'd like to get some help.
I also faced the same issue on Android 10 before, but only with GBoard keyboard. Moreover, the problem existed in Summernote, Jodit, and Quill web versions (tested via Chrome mobile).
But now for some reason everything seems to be working fine!
I face the same problem, and btw it is unstable. Sometimes it is present and sometimes not, with the same build (debug mode).
html_editor_enhanced: 2.5.1 device: android galaxy s9+
@olegyablokov, is it with GBoard only, or with other keyboards too?
@Alspb tested only on GBoard.
Update: can't reproduce the bug with GBoard on Android 10 emulator and Android 13 smartphone, but the problem remains on Android 13 emulator.