Selection operations become exponentially slower with large content
OS: Any Any · Device: Desktop Any · Browser: Any Any · Keyboard: US QWERTY
Open case →Scenario
Selection operations become exponentially slower with large content
Visual view of how this scenario connects to its concrete cases and environments. Nodes can be dragged and clicked.
Each row is a concrete case for this scenario, with a dedicated document and playground.
| Case | OS | Device | Browser | Keyboard | Status |
|---|---|---|---|---|---|
| ce-0226-selection-performance-large | Any Any | Desktop Any | Any Any | US QWERTY | draft |
Open a case to see the detailed description and its dedicated playground.
OS: Any Any · Device: Desktop Any · Browser: Any Any · Keyboard: US QWERTY
Open case →Other scenarios that share similar tags or category.
Managing exponential slowdowns in large documents and browser-specific engine thrashing.
When a contenteditable element is used with virtual scrolling libraries (e.g., for large documents), the virtual scrolling mechanism may interfere with text selection and caret positioning. The selection may be lost when elements are removed from the DOM during scrolling.
The selection (window.getSelection()) in beforeinput events can differ from the selection in corresponding input events. This mismatch can occur during IME composition, text prediction, or when typing adjacent to formatted elements like links. The selection in beforeinput may include adjacent formatted text, while input selection reflects the final cursor position.
When the browser is zoomed (or content is scaled via CSS transforms), caret position and text selection in contenteditable elements can become inaccurate. Clicking at a certain position places the caret elsewhere, and selection highlights may not match the visual selection.
When contenteditable='false' elements are placed inside a contenteditable container, the cursor may disappear or become invisible in certain browsers, making it difficult for users to determine the text insertion point.
Have questions, suggestions, or want to share your experience? Join the discussion below.