You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR fixes#4250 (and also fixes#3922 and fixes#4389) where entering fullscreen, with a key pressed right after the passNextKey command was triggered, would keep the passNextKey mode open and keep passing keys to the page.
This fix exit the common one-key case before passing the key to the page.
I wrote a unit test and I'm currently using this feature daily.
If this fix doesn't suit you, I'm happy to search for an alternative :)
I assume, that "prematurely" exiting the passNextKeyMode can't possibly have any weird side effects?
With the fix, the corresponding keyUp event would always go to Vimium's Normal Mode, but I think Normal Mode doesn't care about keyUp events, so it'll end up being passed to the page anyway - correct? Because if my assumption is incorrect, then the fix would break the passNextKeyMode for cases where the keyUp event is the relevant event that the user wants to pass to the underlying page.
At least I couldn't find any references to keyUp in mode_normal.js. I don't have time to dig deeper right now, but I'm pretty sure it's fine the way the fix implemented.
Correct. After PassNextKeyMode exits, the matching keyup goes through the handler stack again. NormalMode only installs a keydown handler, so it does not consume that keyup. It falls through to the page normally.
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
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
This PR fixes #4250 (and also fixes #3922 and fixes #4389) where entering fullscreen, with a key pressed right after the passNextKey command was triggered, would keep the passNextKey mode open and keep passing keys to the page.
This fix exit the common one-key case before passing the key to the page.
I wrote a unit test and I'm currently using this feature daily.
If this fix doesn't suit you, I'm happy to search for an alternative :)