Type Editor / @type-editor/dom-change-util / browser-hacks/is-android-enter-suggestion-quirk
browser-hacks/is-android-enter-suggestion-quirk
Functions
| Function | Description |
|---|---|
Checks if the Android virtual keyboard enter-and-pick-suggestion quirk is happening. Android's virtual keyboard has a feature where after pressing Enter, it can suggest words or corrections. During this process, Android sometimes:
However, ProseMirror cleans up the DOM selection during step 1, causing Android to give up on step 2, leaving the cursor in the wrong place (issue #1059). This function detects that specific sequence by checking:
When detected, the code drops the new paragraph from the change and dispatches a simulated Enter key event instead. See |