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

Hypergrid mouse events have outdated keys #769

Closed
joneit opened this issue Oct 24, 2018 · 1 comment
Closed

Hypergrid mouse events have outdated keys #769

joneit opened this issue Oct 24, 2018 · 1 comment
Labels

Comments

@joneit
Copy link
Contributor

joneit commented Oct 24, 2018

UI issue reported by @Revathigb diagnosed as follows:

The grid.canvas.currentKeys array is fossilized at last key event received by canvas when it last had focus. When accessed later, some key modifiers may no longer be in the same as they were (e.g., when keys went up or down while canvas blurred).

A reference to grid.canvas.currentKeys is passed to mouse event handlers as e.detail.keys and a copy of this array is passed to keyboard event handlers as e.detail.currentKeys.

These properties need to be getters that update grid.canvas.currentKeys with modifier key states reported in the current mouse event before returning the reference or copy.

@joneit
Copy link
Contributor Author

joneit commented Oct 25, 2018

The getters are implemented in PR #762 and will be released in version 3.1.0.

Note that they all now return a copy (rather than a reference) to grid.canvas.currentKeys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant