Skip to content
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

Keyboard and mouse event fixes #661

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

po5
Copy link
Contributor

@po5 po5 commented May 6, 2024

Supersedes #660

Each commit fixes one of three broken features:

  • Pressing Esc key in search
  • Moving notes by arrow keys
  • Preventing new tab when middle clicking buttons (e.g. fit options on post page)

po5 added 3 commits May 6, 2024 19:45
`this` became inaccessible from hide() when the function was called
from outside.
Note: I don't like the behavior of Escape and Delete, as pressing them
more than once reverses their action.
Also fixes moving notes by arrow keys.

Removed left click detection IE8 hack we inherited from the original
visionmedia/page.js code (cf. https://unixpapa.com/js/mouse.html) as
proper KeyboardEvent.key was introduced in IE9 and it's time to move on.

ArrowUp/Down/Left/Right names have to be mangled to maintain IE9 compat.
Browsers no longer fire the primary 'click' event for middle clicks.
Old way kept for compatibility as it doesn't hurt anything. All browsers
that support auxclick also have standardized MouseEvent.button values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant