Skip to content

fix(Page): disconnect MutationObserver after hash target is found#8007

Open
mr-baraiya wants to merge 6 commits intowebpack:mainfrom
mr-baraiya:fix-mutation-observer
Open

fix(Page): disconnect MutationObserver after hash target is found#8007
mr-baraiya wants to merge 6 commits intowebpack:mainfrom
mr-baraiya:fix-mutation-observer

Conversation

@mr-baraiya
Copy link
Contributor

The MutationObserver continued observing the DOM even after the hash target element was found.
This change disconnects the observer once the element is located, preventing unnecessary DOM observations.

@vercel
Copy link

vercel bot commented Mar 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webpack-js-org Ready Ready Preview, Comment Mar 14, 2026 5:04am

Request Review

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to write cypress test for such things to ensure we don't break something

@mr-baraiya
Copy link
Contributor Author

I've added Cypress tests to cover the behavior and fixed the ESLint issue ("use strict" requirement) so the checks pass.

@alexander-akait
Copy link
Member

Here tests are failed too

@mr-baraiya
Copy link
Contributor Author

I’ve added the Cypress test and updated it to make the hash navigation behavior more stable. All checks are now passing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants