webcomic
webcomic copied to clipboard
Improvements to collection keyboard navigation
Change
Fix collisions between browser shortcuts and comic next/previous navigation. See commit messages for full details.
Bug Fix – Fixes an issue with existing functionality
Context
Previously, keyboard modifiers (Ctrl/Alt/Meta) were ignored when looking up keyboard shortcuts. This made it impossible to use the browser's native ArrowLeftAlt/ArrowRightAlt shortcuts for history navigation, since the plugin would also perform navigation of its own on the same shortcuts.
Verification
- [x] I have read the code of conduct and contributing guidelines
- [x] I have followed the project's coding standards
- [x] ~~I have added tests to cover all changes~~
- [x] ~~I have verified that all new and existing tests pass~~ (N/A, there don't seem to be tests for JS)
- [x] I have tested these changes on WordPress 5.7
(as Vagrant provisioning seems to be broken, tested by replacing
wp-content/plugins/webcomic/srv/collection/common.js
with an unminified, modified version) - [x] I have tested these changes on PHP 7.4.16
- [x] I have tested these changes in: Firefox 86, Chromium 89
@mgsisk bump - LMK if there's anything you need from me on this