Skip to content

fix: attribute pointer lock, keyboard lock and paste checks to the requesting frame - #53664

Merged
MarshallOfSound merged 2 commits into
mainfrom
fix/pointer-lock-requesting-frame
Sep 7, 2026
Merged

fix: attribute pointer lock, keyboard lock and paste checks to the requesting frame#53664
MarshallOfSound merged 2 commits into
mainfrom
fix/pointer-lock-requesting-frame

Conversation

@MarshallOfSound

Copy link
Copy Markdown
Member
  • pointerLock / keyboardLock permission requests are made for the frame that called the API rather than always the primary main frame, so setPermissionRequestHandler sees that frame's requestingUrl / isMainFrame.
  • document.execCommand('paste') is allowed on transient user activation of the requesting frame (as in Chrome) instead of any recent interaction in the WebContents; otherwise the clipboard-read check decides as before.
  • Docs: drop the "always appear to originate from the main frame" notes.

Notes: pointerLock and keyboardLock permission requests now report the requesting frame, and execCommand('paste') requires user activation in the frame that calls it.

…questing frame

* pointerLock / keyboardLock permission requests are made for the frame that
  owns the requesting widget instead of always the primary main frame, so
  setPermissionRequestHandler sees the iframe's requestingUrl / isMainFrame
* the deprecated sync clipboard read (execCommand('paste')) is allowed on
  transient user activation of the requesting frame, matching Chrome, instead
  of any recent interaction anywhere in the WebContents; otherwise the
  clipboard permission check decides as before
* docs: drop the "always appear to originate from the main frame" caveat
* specs for both
@MarshallOfSound MarshallOfSound added semver/patch backwards-compatible bug fixes target/42-x-y PR should also be added to the "42-x-y" branch. target/43-x-y PR should also be added to the "43-x-y" branch. target/44-x-y PR should also be added to the "44-x-y" branch. target/45-x-y PR should also be added to the "45-x-y" branch. labels Sep 7, 2026
@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Sep 7, 2026
@MarshallOfSound
MarshallOfSound enabled auto-merge (squash) September 7, 2026 09:08
@MarshallOfSound MarshallOfSound self-assigned this Sep 7, 2026
@MarshallOfSound
MarshallOfSound merged commit 71e7dcf into main Sep 7, 2026
78 of 79 checks passed
@MarshallOfSound
MarshallOfSound deleted the fix/pointer-lock-requesting-frame branch September 7, 2026 17:43
@release-clerk

release-clerk Bot commented Sep 7, 2026

Copy link
Copy Markdown

Release Notes Persisted

pointerLock and keyboardLock permission requests now report the requesting frame, and execCommand('paste') requires user activation in the frame that calls it.

@github-actions github-actions Bot added the 46-x-y label Sep 7, 2026
@trop

trop Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "43-x-y" cleanly;
you will need to perform this backport manually.

@trop

trop Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "42-x-y" cleanly;
you will need to perform this backport manually.

@trop

trop Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "45-x-y", please check out #53692

@trop trop Bot added the in-flight/45-x-y label Sep 7, 2026
@trop

trop Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "44-x-y", please check out #53693

@trop trop Bot added in-flight/44-x-y and removed target/45-x-y PR should also be added to the "45-x-y" branch. target/44-x-y PR should also be added to the "44-x-y" branch. labels Sep 7, 2026
@trop

trop Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

@MarshallOfSound has manually backported this PR to "43-x-y", please check out #53701

@trop

trop Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

@MarshallOfSound has manually backported this PR to "42-x-y", please check out #53702

@trop trop Bot added in-flight/42-x-y merged/45-x-y PR was merged to the "45-x-y" branch. merged/44-x-y PR was merged to the "44-x-y" branch. and removed needs-manual-bp/42-x-y in-flight/45-x-y in-flight/44-x-y labels Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

46-x-y in-flight/42-x-y in-flight/43-x-y merged/44-x-y PR was merged to the "44-x-y" branch. merged/45-x-y PR was merged to the "45-x-y" branch. new-pr 🌱 PR opened recently semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants