vimium
vimium copied to clipboard
Wikipedia and Github Issue preview popups remain open after using LinkHints.activateModeToOpenInNewTab
when I use f to click on a Wikipedia link(within the text) and then I open it in a new tab using shift and the corresponding letter for that link. the preview is opened and I can't close it unless I click on the page with my mouse. Please fix that so the preview won't open when one opens a link in a new tab.
I can generate the same effect in Chrome.
The problem seems to be that we're generating a mouseover
event, but not the corresponding mouseout
event, here. Adding the mouseout
event seems to fix the problem for me.
Might there be any unintended consequences if we add that event to the list?
I can't really think of any unintended consequences.
Maybe we can add a keydown handler to grab the next Esc
to dispatch mouseout
to the last clicked, when LinkHints clicks someone and exits. All other keys the handler receives should exit the handler itself and continue to broadcast.
Added: we need to keep the float panel showing when LinkHints exits, because a user may want to read something and click some things in the panel.
Therefore, I has another idea to deal with it: dispath an extra mouseout
ONLY IF LinkHints
is in OPEN_IN_NEW_FG_TAB
mode and the source tab loses its foucs in 1 second.
Maybe we can add a keydown handler to grab the next
Esc
...
Yes.
no news? :D
Would the recently added Hover and Focus mouse events help with this, at least to be able to move away the focus using another keyboard shortcut? (see changelog for 1.66)
In Vimium, action=hover
applies hover
and unhover
on an Escape key, but a normal f
command (LinkHints.activateMode
) won't dispatch unhover (mouseout
) events.
I have made a customized version of Vimium, named Vimium C, and it supports map f LinkHints.activateModeWithQueue autoUnhover
to auto dispatch mouseout
events. If you don't like to "unhover at once", you may press Escape (even without action=hover
), or map a key to LinkHints.unhoverLast
and then trigger the command manually.
So y'all don't use F
on Wikipedia or what? The preview pops up and stays there... Really there need not any hover to begin with (?).
(Sorry if the tone feels snarky &c. Nothing wrong with being blunt. Just asking a question...)
Edit: I mean, the same thing happens on GitHub issues page. Like obviously this can't be the behavior we want?
On Wikipedia, when we hover the mouse pointer over an article link, a preview pops up.
- With the
LinkHints.activateMode action=hover
command, pressingEsc
closes the preview. - But with
LinkHints.activateModeToOpenInNewTab
(bound toF
by default; opens a new tab for link in the background), the preview does not close withEsc
.
So it appears to me we just need to apply the code for 1. to 2. Better yet, however, is to prevent the preview from popping up in the first place.
(Tested on Firefox.)
@ropery I'm confirming that it's super annoying. I haven't looked into the ramifications of your suggestion, but on the surface it seems reasonable to me. "ESC triggers unhover" seems reasonable and intuitive.
I wonder if the rationale for not always unhover immediately is so that menus that disappear on mouseout will work with link hints?
so that menus that disappear on mouseout will work with link hints?
Yes some webpages use popup card to show secondary menus and buttons, so unhovering
should be optional.