Skip to content
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

#8933: adds mousedown handler to solve document mousedown handler bug #8931

Merged
merged 3 commits into from
Jul 26, 2024

Conversation

grahamlangford
Copy link
Collaborator

@grahamlangford grahamlangford commented Jul 26, 2024

What does this PR do?

For more information on our expectations for the PR process, see the
code review principles doc

@grahamlangford grahamlangford self-assigned this Jul 26, 2024
@grahamlangford grahamlangford added this to the 2.0.6 milestone Jul 26, 2024
@grahamlangford grahamlangford enabled auto-merge (squash) July 26, 2024 14:37
Copy link

No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack.

Do not edit this comment manually.

@twschiller twschiller added the bug Something isn't working label Jul 26, 2024
Comment on lines +66 to +71
// In Chrome 127.0.6533.73, the `chrome.sidePanel.open()` API started throwing user gesture errors
// when a message from the content script was sent to the background script.
// The root cause appears to be a registered mousedown handler on the document that sends a message
// Adding `mousedown` here ensures that the sidePanel.open call is made before the message for the mousedown
// handler on the document is sent.
// See https://issues.chromium.org/issues/355266358 for more details.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for the detailed, concise explanation!

@twschiller twschiller changed the title adds mousedown handler to solve document mousedown handler bug #8933: adds mousedown handler to solve document mousedown handler bug Jul 26, 2024
@grahamlangford grahamlangford enabled auto-merge (squash) July 26, 2024 14:44
Copy link

codecov bot commented Jul 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.60%. Comparing base (8318d74) to head (91132c7).
Report is 125 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8931      +/-   ##
==========================================
+ Coverage   74.24%   74.60%   +0.35%     
==========================================
  Files        1332     1336       +4     
  Lines       40817    41202     +385     
  Branches     7634     7704      +70     
==========================================
+ Hits        30306    30737     +431     
+ Misses      10511    10465      -46     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Jul 26, 2024

Playwright test results

passed  112 passed
flaky  2 flaky
skipped  6 skipped

Details

report  Open report ↗︎
stats  120 tests across 40 suites
duration  9 minutes, 46 seconds
commit  91132c7
info  For more information on how to debug and view this report, see our readme

Flaky tests

edge › tests/pageEditor/copyMod.spec.ts › run a copied mod with a built-in integration
edge › tests/runtime/sidebar/sidebarNavigation.spec.ts › sidebar mod panels are persistent during navigation

Skipped tests

chrome › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor
edge › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor
chrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options
edge › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options
chrome › tests/runtime/insertAtCursor.spec.ts › Insert at Cursor › 8154: can insert at cursor after opening sidebar from selection menu
edge › tests/runtime/insertAtCursor.spec.ts › Insert at Cursor › 8154: can insert at cursor after opening sidebar from selection menu

@grahamlangford grahamlangford merged commit f78831b into main Jul 26, 2024
22 checks passed
@grahamlangford grahamlangford deleted the user-gesture-dialog-on-mousedown branch July 26, 2024 17:31
fungairino pushed a commit that referenced this pull request Jul 26, 2024
…#8931)

* adds mousedown handler to solve document mousedown handler bug

* explain the mousedown event
fungairino added a commit that referenced this pull request Jul 29, 2024
* fix this thing

* wrap mutationobserver in feature flag

* 8925: fix sidebar not being updated on deployment group membership removal (#8932)

* fix sidebar not being updated on deployment group membership removal

* skip test

* #8933: adds mousedown handler to solve document mousedown handler bug (#8931)

* adds mousedown handler to solve document mousedown handler bug

* explain the mousedown event

* Define report mode constants (#8926)

* #8421: default sidebar to a panel for mod that set the badge (#8918)

* Fix beta starter brick feature flag detection (#8929)

* Prevent crash with `getContexts` and fix the window reference in `reportError` (#8934)

* don't reference window from a background function

* remove dangerous getContexts call from offscreen doc logic

* fix logic issues

* add some debug logs

* cleanup

* more specific version

---------

Co-authored-by: Ben Loe <[email protected]>

* add e2e test

* remove page.pause in test

* revert reportError noop

* Rename flag, and change it to enable the hack.

* switching to using jquery initialize

* rename

---------

Co-authored-by: Eduardo <[email protected]>
Co-authored-by: Graham Langford <[email protected]>
Co-authored-by: Todd Schiller <[email protected]>
Co-authored-by: Ben Loe <[email protected]>
Co-authored-by: Ben Loe <[email protected]>
grahamlangford added a commit that referenced this pull request Jul 29, 2024
* fix this thing

* wrap mutationobserver in feature flag

* 8925: fix sidebar not being updated on deployment group membership removal (#8932)

* fix sidebar not being updated on deployment group membership removal

* skip test

* #8933: adds mousedown handler to solve document mousedown handler bug (#8931)

* adds mousedown handler to solve document mousedown handler bug

* explain the mousedown event

* Define report mode constants (#8926)

* #8421: default sidebar to a panel for mod that set the badge (#8918)

* Fix beta starter brick feature flag detection (#8929)

* Prevent crash with `getContexts` and fix the window reference in `reportError` (#8934)

* don't reference window from a background function

* remove dangerous getContexts call from offscreen doc logic

* fix logic issues

* add some debug logs

* cleanup

* more specific version

---------

Co-authored-by: Ben Loe <[email protected]>

* add e2e test

* remove page.pause in test

* revert reportError noop

* Rename flag, and change it to enable the hack.

* switching to using jquery initialize

* rename

---------

Co-authored-by: Eduardo <[email protected]>
Co-authored-by: Graham Langford <[email protected]>
Co-authored-by: Todd Schiller <[email protected]>
Co-authored-by: Ben Loe <[email protected]>
Co-authored-by: Ben Loe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants