-
Notifications
You must be signed in to change notification settings - Fork 15k
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() not working #31572
Conversation
Should be rebased when #31573 is merged. |
cc963ef
to
c57cf23
Compare
6b10342
to
abd9717
Compare
patches/chromium/fix_patch_out_permissions_checks_in_exclusive_access.patch
Outdated
Show resolved
Hide resolved
abd9717
to
ac16eef
Compare
ac16eef
to
9f89d00
Compare
Release Notes Persisted
|
I was unable to backport this PR to "15-x-y" cleanly; |
I have automatically backported this PR to "16-x-y", please check out #31621 |
@codebytere has manually backported this PR to "15-x-y", please check out #31846 |
@@ -1346,6 +1389,18 @@ void WebContents::FindReply(content::WebContents* web_contents, | |||
Emit("found-in-page", result.GetHandle()); | |||
} | |||
|
|||
void WebContents::RequestKeyboardLock(content::WebContents* web_contents, | |||
bool esc_key_locked) { | |||
exclusive_access_manager_->keyboard_lock_controller()->RequestKeyboardLock( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should allow the browser process to deny this; does this go through existing permissions stuff or do we need to add something new?
* fix: navigator.keyboard.lock() not working * chore: address review feedback
Description of Change
Closes #31420.
Fixes an issue where
navigator.keyboard.lock()
did not work. The patch surface here is fairly small, and might be best combined with another similar patch. I considered potentially subclassing, but the maintenance burden there I felt to be greater since that would require subclassing and pulling in huge swathes ofchrome/browser/ui/exclusive_access
.Please leave general thoughts or if you have them, alternative approaches to minimize change surface!
Checklist
npm test
passesRelease Notes
Notes: Enables support for
navigator.keyboard.lock()
.