mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
761f01d612
`HTMLEditRules::ApplyBlockStyle()` stores `curBlock` and `newBlock` during its loop to keep handling from deeper child to ancestor, and may do two things for a `curNode`. If `curBlock` and/or `newBlock` is moved from expected container when it sets one of or both of them, this patch check whether mutation event listeners change the DOM tree. Additionally, this patch also checks whether `curNode' is moved by mutation event listener at first step of two jobs for it. Differential Revision: https://phabricator.services.mozilla.com/D32689 --HG-- extra : moz-landing-system : lando
15 lines
356 B
HTML
15 lines
356 B
HTML
<script>
|
|
function go() {
|
|
document.execCommand("justifyFull", false)
|
|
document.execCommand("selectAll", false)
|
|
window.top.addEventListener("DOMNodeRemoved", eh)
|
|
document.execCommand("heading", false, "H1")
|
|
}
|
|
function eh() {
|
|
document.execCommand("insertHTML", false, undefined)
|
|
}
|
|
</script>
|
|
<body onload=go()>
|
|
<dd contenteditable="true">A
|
|
<!-- A -->
|