Skip to content

chore: use mutation observer to reset hover model #36478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2025

Conversation

pavelfeldman
Copy link
Member

No description provided.

@@ -1095,16 +1115,19 @@ export class Recorder {

this.highlight.appendChild(createSvgElement(this.document, clipPaths));
this.overlay?.install();
for (const tool of Object.values(this._tools))
tool.install?.();
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be just this._currentTool.install()? And if so, we can remove that call from the constructor.

@@ -204,7 +206,23 @@ class RecordActionTool implements RecorderTool {
return 'pointer';
}

cleanup() {
install() {
this._observer = new MutationObserver(mutations => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this does not cross the shadow boundary. Perhaps not resetting hovered model it in random places would work instead?

This comment has been minimized.

Copy link
Contributor

Test results for "tests 1"

6 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:119:7 › cli codegen › should type after clicking twice @firefox-ubuntu-22.04-node18
⚠️ [firefox-page] › page/page-wait-for-function.spec.ts:104:3 › should work with strict CSP policy @firefox-ubuntu-22.04-node18
⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @ubuntu-latest-node22-1
⚠️ [webkit-library] › library/browsercontext-viewport-mobile.spec.ts:87:5 › mobile viewport › should support window.orientation emulation @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › page/page-screenshot.spec.ts:345:5 › page screenshot › should work while navigating @webkit-ubuntu-22.04-node18
⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1

46472 passed, 931 skipped
✔️✔️✔️

Merge workflow run.

@pavelfeldman pavelfeldman merged commit 536c273 into microsoft:main Jun 27, 2025
32 checks passed
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