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

Prevent Firefox's global paste behavior if paste target is not also focused #2581

Merged
merged 4 commits into from
Jun 4, 2024

Conversation

franknoirot
Copy link
Collaborator

Fixes #2285 by preventing Firefox's unique behavior where users can globally paste into their last-focused input or contenteditable field, even when that field is not the currently-focused element.

Demo

Performed in Firefox on Ubuntu. The first portion is with the fix, then I revert and stash the commit to show the broken behavior. Note how with the fix, users can still paste with any method including middle click, but now must have the code pane (or another input such as the KCL expression input in the command bar) focused before they can paste into it.

Screencast.from.2024-06-03.14-55-05.webm

@franknoirot franknoirot added the ux-papercut User experience paper cuts label Jun 3, 2024
Copy link

qa-wolf bot commented Jun 3, 2024

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

Copy link

vercel bot commented Jun 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Jun 4, 2024 6:16pm

@franknoirot
Copy link
Collaborator Author

Was able to add a test thanks to guidance here: microsoft/playwright#8114

@franknoirot
Copy link
Collaborator Author

franknoirot commented Jun 4, 2024

Demo of test showing the fix!

Screenshare.-.2024-06-04.1_48_03.PM-compressed.mp4

@franknoirot franknoirot merged commit 29cdc66 into main Jun 4, 2024
16 checks passed
@franknoirot franknoirot deleted the franknoirot/block-middle-paste branch June 4, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ux-papercut User experience paper cuts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Panning with the middle mouse button pastes clipboard text
1 participant