-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use click event to determine modifier keys
Previously, editor elements had to listen for mouse_up events to determine when a click had completed. This meant that they only had access to modifier keys that were pressed during the mouse_up event. This led to some incorrect user experiences, such as executing a ctrl+click if the user pressed ctrl after pressing the mouse button, but before releasing it. This change adds a click event handler to EditorElement, and adds a modifier() method to the ClickEvent, which only includes the modifier keys that were pressed during both mouse down and mouse up. The code for handling link clicks has been moved into the click event handler, so that it's only triggered when the non-multi-cursor modifier was held for both the mouse down and mouse up events.
- Loading branch information
1 parent
0f1c2a8
commit 3f44a7a
Showing
5 changed files
with
91 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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