Type Editor / @type-editor/dom-change-util / browser-hacks/should-suppress-selection-during-composition
browser-hacks/should-suppress-selection-during-composition
Functions
| Function | Description |
|---|---|
Checks if selection should be suppressed due to Chrome composition issues. During IME composition and in certain edge cases, Chrome and IE have quirks where they report incorrect selection positions. This function detects those cases so that the selection update can be skipped. Chrome composition issue: During composition, Chrome sometimes reports the selection in the wrong place. The check detects this by looking for:
IE edge case: IE doesn't move the cursor forward when starting to type in an empty block or between BR nodes. Detected by:
In both cases, the selection update is skipped to avoid placing the cursor in the wrong position. |