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

fix: navigator.keyboard.lock() fullscreen exit handling #40365

Merged
merged 1 commit into from Oct 31, 2023

Conversation

codebytere
Copy link
Member

Description of Change

Closes #40342.

Fixes an issue where navigator.keyboard.lock() did not work per latest expected behavior - pressing Esc exited fullscreen immediately despite a keyboard lock being present to capture the key. We added this behavior historically when we didn't use the ExclusiveAccessManager - it now handles fullscreen capture and exit when necessary.

This can be tested with https://fullscreen-keyboard-lock.glitch.me - now, pressing and holding escape correctly triggers RequiresPressAndHoldEscToExit() and associated logic.

Checklist

Release Notes

Notes: Fixes an issue where navigator.keyboard.lock() did not work per latest expected behavior

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/26-x-y PR should also be added to the "26-x-y" branch. target/27-x-y PR should also be added to the "27-x-y" branch. target/28-x-y PR should also be added to the "28-x-y" branch. labels Oct 30, 2023
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Oct 30, 2023
@codebytere codebytere force-pushed the fix-keyboard-lock-fullscreen-handling branch 3 times, most recently from dd045dd to 391946a Compare October 30, 2023 20:12
@codebytere codebytere force-pushed the fix-keyboard-lock-fullscreen-handling branch from 391946a to ceae6fd Compare October 30, 2023 20:32
Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

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

👍

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Oct 31, 2023
@jkleinsc jkleinsc merged commit fcdd5cb into main Oct 31, 2023
17 checks passed
@jkleinsc jkleinsc deleted the fix-keyboard-lock-fullscreen-handling branch October 31, 2023 15:59
Copy link

release-clerk bot commented Oct 31, 2023

Release Notes Persisted

Fixes an issue where navigator.keyboard.lock() did not work per latest expected behavior

@trop
Copy link
Contributor

trop bot commented Oct 31, 2023

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

@trop trop bot removed the target/26-x-y PR should also be added to the "26-x-y" branch. label Oct 31, 2023
@trop
Copy link
Contributor

trop bot commented Oct 31, 2023

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

@trop
Copy link
Contributor

trop bot commented Oct 31, 2023

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

@trop trop bot added in-flight/27-x-y in-flight/28-x-y and removed target/27-x-y PR should also be added to the "27-x-y" branch. labels Oct 31, 2023
@trop trop bot added merged/26-x-y PR was merged to the "26-x-y" branch. merged/28-x-y PR was merged to the "28-x-y" branch. merged/27-x-y PR was merged to the "27-x-y" branch. and removed target/28-x-y PR should also be added to the "28-x-y" branch. in-flight/26-x-y in-flight/28-x-y in-flight/27-x-y labels Oct 31, 2023
MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
…0365)

fix: navigator.keyboard.lock() fullscreen exit handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/26-x-y PR was merged to the "26-x-y" branch. merged/27-x-y PR was merged to the "27-x-y" branch. merged/28-x-y PR was merged to the "28-x-y" branch. semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Navigator.keyboard.lock() icw requestFullscreen does not change behavior to 'Press and Hold Escape'
3 participants