mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 19:33:18 +00:00
a1b8ba8568
Chromium removes new empty blocks only when the content is removed by dragging. Before bug 1504910, we just removed the dragged range, i.e., kept the new empty blocks. However, now, we put `<br>` element from `HTMLEditRules::AfterEditInner()` because a D&D action was split to the deletion part and inserting part (It wasn't called after inserting the dropped content). Therefore, this patch adds new path for D&D into `HTMLEditRules::WillDeleteSelection()`. If parent blocks become empty, the path removes such blocks and collapse `Selection` to where the most ancestor empty block was. With this patch, we get same behavior as Chrome in most cases. You can check it in https://jsfiddle.net/d_toybox/9px07yLr/ Differential Revision: https://phabricator.services.mozilla.com/D34147 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
composer | ||
libeditor | ||
reftests | ||
spellchecker | ||
txmgr | ||
AsyncSpellCheckTestHelper.jsm | ||
moz.build | ||
nsIDocumentStateListener.idl | ||
nsIEditActionListener.idl | ||
nsIEditor.idl | ||
nsIEditorMailSupport.idl | ||
nsIEditorObserver.idl | ||
nsIEditorSpellCheck.idl | ||
nsIEditorStyleSheets.idl | ||
nsIHTMLAbsPosEditor.idl | ||
nsIHTMLEditor.idl | ||
nsIHTMLInlineTableEditor.idl | ||
nsIHTMLObjectResizer.idl | ||
nsIPlaintextEditor.idl | ||
nsITableEditor.idl | ||
nsIURIRefObject.idl |