Move `EditorBase::FindBetterInsertionPoint` to `TextEditor`
Categories
(Core :: DOM: Editor, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox116 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(1 file)
It works with HTMLEditor
only when it's in the plaintext mode. However, the result is odd.
If the given point (typically caret position) is in the <body>
, then,
- and if it points start of the
<body>
and its first child is a text node, returns start of the text node - and if it does not point start of the
<body>
, and its last child is a text node, returns end of the text node
The latter condition is really odd, and the first thing is handled by the main caller, EditorBase::InsertTextWithTransaction
.
Therefore, I believe that the special handling in it is required only by TextEditor
.
Assignee | ||
Comment 1•1 year ago
|
||
Currently it runs if the instance is a TextEditor
or it's in the plaintext
mode of HTMLEditor
. However, it does not make sense to run it only in
specific mode of HTMLEditor
, and most part does not make sense for
HTMLEditor
.
This patch moves the method to TextEditor
, and for
EditorBase::InsertTextWithTransaction()
and
AutoRangeArray::ExtendAnchorFocusRangeFor()
, adds new method to
EditorDOMPointBase
to get a text node position if it points around
a text node.
Comment 3•1 year ago
|
||
bugherder |
Description
•