Type Editor / @type-editor/dom-change-util / browser-hacks/should-handle-mobile-enter-key
browser-hacks/should-handle-mobile-enter-key
Functions
| Function | Description |
|---|---|
Checks if a mobile Enter key should be handled instead of processing the DOM change. Mobile browsers (iOS and Android) sometimes handle Enter key presses in ways that are better processed through the key handler than as DOM changes. This function detects such cases by checking:
When all conditions are met, the Enter key is dispatched through the handleKeyDown plugin system instead of processing the DOM change directly. Remarks Uses a regex to detect inline vs block-level HTML elements |