refactor: Replace keycode dependency with event.key#8735
Merged
mister-ben merged 3 commits intovideojs:mainfrom May 23, 2024
Merged
refactor: Replace keycode dependency with event.key#8735mister-ben merged 3 commits intovideojs:mainfrom
mister-ben merged 3 commits intovideojs:mainfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8735 +/- ##
==========================================
- Coverage 83.15% 83.00% -0.15%
==========================================
Files 120 119 -1
Lines 7995 7991 -4
Branches 1924 1921 -3
==========================================
- Hits 6648 6633 -15
- Misses 1347 1358 +11 ☔ View full report in Codecov by Sentry. |
gkatsev
approved these changes
May 17, 2024
This was referenced Jun 28, 2024
This was referenced Aug 1, 2024
This was referenced Sep 25, 2024
gkatsev
reviewed
Nov 13, 2024
|
|
||
| // Escape or Tab unpress the 'button' | ||
| if (keycode.isEventKey(event, 'Esc') || keycode.isEventKey(event, 'Tab')) { | ||
| if (event.key === 'Esc' || event.key === 'Tab') { |
Member
There was a problem hiding this comment.
looks like during review, we missed that these should be Escape rather than Esc, which keycode likely helped with. Someone noticed this issue in slack.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Removes the keycode dependency. That relies on now deprecated event properties.
KeyboardEvent.keyis now ubiquitous, so can be used directly instead.Reduces min.js slightly, 646.9 kB => 645.22 kB
The uses of deprecated
keyCodein utils/spatial-navigation-keycode.js ought to be reviewed too.Requirements Checklist