Skip to content

Conversation

dgozman
Copy link
Contributor

@dgozman dgozman commented Sep 27, 2025

Dialog position logic did not account for the viewport size. To fix this, copy logic from highlight.ts that does it for tooltips.
This issue was reported here.

Dirve-by: make dialog measure its width instead of hardcoding 200, make useMeasure() return the full rect, not just size.

onMouseDown={preventDefault}>
{icons.settings()}
</a>
<Dialog
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is important that anchor ref is placed in the DOM before the Dialog. Otherwise, React does not have it initialized by the time we measure the ref.

@dgozman dgozman requested a review from agg23 September 27, 2025 13:57
@dgozman dgozman force-pushed the fix-dialog-positioning branch 2 times, most recently from 4af1041 to 8e56339 Compare September 28, 2025 07:07

This comment has been minimized.

Dialog position logic did not account for the viewport size.
To fix this, copy logic from highlight.ts that does it for tooltips.
@dgozman dgozman force-pushed the fix-dialog-positioning branch from 8e56339 to 2ad7d51 Compare September 30, 2025 07:03
Copy link
Contributor

Test results for "tests 1"

4 flaky ⚠️ [chromium-library] › library/popup.spec.ts:258 › should not throw when click closes popup `@chromium-ubuntu-22.04-node18`
⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1079 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node18`
⚠️ [firefox-page] › page/page-event-request.spec.ts:182 › should return response body when Cross-Origin-Opener-Policy is set `@firefox-ubuntu-22.04-node18`
⚠️ [webkit-library] › library/inspector/cli-codegen-pick-locator.spec.ts:35 › should update locator highlight `@webkit-ubuntu-22.04-node18`

46931 passed, 821 skipped


Merge workflow run.

@dgozman dgozman merged commit 0f2e138 into microsoft:main Sep 30, 2025
32 of 35 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