Remove specific keyboard shortcut logic #2148
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of change
Objective
While Oscar reviewed the PR #2132 he had the following comment #2132 (comment)
Looking into the
shortcut.ts
I realized that, although built for Safari and Vivaldi the code to check for the message'keyboardShortcutTriggered
' would only apply to Vivaldi.While discussing this further with Oscar via Slack, we found the changes that removed the check for Safari (PR #1491).
At the time I tested the keyboard shortcuts on Vivaldi while Oscar tested on Safari. Conclusion even when removing all logic for the shortcuts in
shortcut.ts
the keyboard shortcuts would still work as expected.Through PR #1491 the check for isSafari was removed from commands.background.ts
Also with this PR the __bitwardenFrameId was removed all other places but not from shortcut.ts
Other interesting PR's:
Code changes
Testing requirements
The following keyboard shortcuts should still work under Safari and Vivaldi (there seems to be an upstream issue, where keyboard shortcuts will only work when set to Global instead of "In Vivaldi" (
chrome://extensions/shortcuts
) )Ctrl/CMD + Shift + Y → Activate extension
Ctrl/CMD + Shift + L → Autofill, press again to cycle through matching logins
Ctrl/CMD + Shift + 9 → Generate a password and copy it to the clipboard
Ctrl/CMD + Shift + N → Lock extension
suggested_key
attributes, but because_execute_sidebar_action
which is only supported in FF we can't have another entry for lock vault.npm run build
as that just builds without modifying themanifest.json
Before you submit
npm run lint
) (required)