Open Bug 1622280 Opened 6 years ago Updated 4 years ago

MutationObserver: it logs 2 mutations when we do 1 change with the inspector element

Categories

(DevTools :: Inspector, defect, P2)

74 Branch
defect

Tracking

(Not tracked)

People

(Reporter: thewaxontheweb, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0

Steps to reproduce:

** Steps to reproduce **

  • Get the below "BugMutationObserver.html" file and open it in your firefox browser
  • Open & watch the console to see the auto change set
  • Inspect element & change the id="container" to id="whatever_you_want"
  • Watch the console to see your manual change

Actual results:

** Actual results **

For this one change you've done by the mean of the inspector,
it logs two mutations:

  • Array [ MutationRecord, MutationRecord ] *

Expected results:

** Expected results **

It should log only one mutation (Chrome have the expected behavior for example):

  • Array [ MutationRecord ] *

Notice, the auto-change case set with setTimeout which start to run after 1500ms,
you can see that for each change, there is only one mutation.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Inspector
Product: Firefox → DevTools

Thanks for filing! Indeed, there's an when changing attributes via the Inspector only. The issue does not reproduce when mutating the node via the Console.

Priority: -- → P2
Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: