author Masayuki Nakano <masayuki@d-toybox.com>
Thu, 02 Feb 2023 05:09:15 +0000
changeset 651452 20512741e7b60f3f6791002d8311d681f9242e68
parent 574942 93e0e2807b57cb26bc1c2fa8549e8c626a5374f6
permissions -rw-r--r--
Bug 1812170 - Make `HTMLEditor::ClearStyleAt` should return `pointToPutCaret` if next node of first split is not split r=m_kato The new path added in bug 1807829 hits the odd result case of `ClearStyleAt`. `pointToPutCaret` may be updated if the preceding split occurs. Therefore, it should be returned if it does not split next nodes after the first split instead of returning unset point (because of not splitting the point, `unwrappedSplitNodeResult.AtSplitPoint` may return unset point, therefore, it may return unset point in the case). Additionally, I forgot to split delete `SplitNodeResult::mCaretPoint` in bug 1792654, and it causes `SplitNodeDeepWithTransaction` returns unset caret point. This patch fixes this bug too. Differential Revision: https://phabricator.services.mozilla.com/D168179

.c { resize: both }
window.onload = () => {
  a.className = "a"
  document.execCommand("delete", false)
<input id="a" autofocus="autofocus" class="c">