[wp-trac] [WordPress Trac] #29954: Improve calculation of the caret position in editor-expand
WordPress Trac
noreply at wordpress.org
Mon Oct 13 23:50:12 UTC 2014
#29954: Improve calculation of the caret position in editor-expand
--------------------------+-----------------
Reporter: azaozz | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.1
Component: Editor | Version: 4.0
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------
Currently we use `node.getBoundingClientRect()` to get the approximate
position of the caret in TinyMCE. This works well except it gets the
position of the parent block. We should use `range.getClientRects()` when
available to get the exact position of the caret.
This will fix scrolling into view when the current block element is taller
than the visible part of the editor.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29954>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list