-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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: handle shortcuts by default if no WebPreference object exists #14766
Conversation
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.
LGTM, can you try adding a spec ?
@deepak1556 I did look into making a spec but we currently have no way to trigger keyboard inputs that map into the |
|
@deepak1556 I thought |
5066258
to
8813304
Compare
@deepak1556 Test added 👍 |
8813304
to
8b22a96
Compare
@deepak1556 The test was failing on CI and it was super flaky locally, ended up using the |
Why is it required to test the specific shortcut execution ? Wouldn't it be enough to just see if the shortcut gets passed to the desired window in |
@deepak1556 I don't want to emit an event purely for the case of testing, people will start using it when they shouldn't and making this spec isn't too hard and is guaruntee'ed end-to-end working 👍 |
We already have a couple of internal events, methods purely for testing. Agreed this could be easier if we have native tests. Incase we want to go with the non event route then a shortcut thats deterministic like devtools reload, I am just worried about the polling for checking the clipboard response, it can get flaky on ci. I am good with the original fix for the issue and the spec looks good too, was just hoping it could be better. |
To be honest, I added that even though it was working synchronously consistently. I added it with the specific intent of avoiding future race condition flakes. I think this is in a relatively good state. |
DevTools webcontents do not have webpreferences Fixes #14685
8b22a96
to
a39a13c
Compare
I've disabled these tests on CI on macOS, assuming the VM's don't work with robotjs or something. The tests pass locally on macOS on both my macOS machines and someone else's. |
Failed windows ia32 CI was a flake |
Release Notes Persisted
|
/trop run backport-to 3-0-x |
The backport process for this PR has been manually initiated, |
@mhuggins no |
DevTools webContents do not have webPreferences
reccomend viewing the diff with
?w=1
Fixes #14685
Notes: fix basic shortcuts (copy, paste, etc.) not working in devtools