Skip to content
Permalink
Browse files

Ignore uninteresting style attribute mutations

  • Loading branch information...
marijnh committed Aug 12, 2019
1 parent 92c0e27 commit 19826533e6c42fb010b72f5ddcacceb6bdacbdfd
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/domobserver.js
@@ -132,7 +132,10 @@ export class DOMObserver {
registerMutation(mut) {
let desc = this.view.docView.nearestDesc(mut.target)
if (mut.type == "attributes" &&
(desc == this.view.docView || mut.attributeName == "contenteditable")) return null
(desc == this.view.docView || mut.attributeName == "contenteditable" ||
// Firefox sometimes fires spurious events for null/empty styles
(mut.attributeName == "style" && !mut.oldValue && !mut.target.getAttribute("style"))))
return null
if (!desc || desc.ignoreMutation(mut)) return null

if (mut.type == "childList") {

0 comments on commit 1982653

Please sign in to comment.
You can’t perform that action at this time.