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

Wikipedia and Github Issue preview popups remain open after using LinkHints.activateModeToOpenInNewTab #3073

Closed
rnmhdn opened this issue Jul 30, 2018 · 10 comments · Fixed by #4420
Labels

Comments

@rnmhdn
Copy link

rnmhdn commented Jul 30, 2018

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.

@rnmhdn rnmhdn changed the title Wikipedia preview firefox - Wikipedia preview Jul 30, 2018
@smblott-github
Copy link
Collaborator

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?

@rnmhdn
Copy link
Author

rnmhdn commented Aug 10, 2018

I can't really think of any unintended consequences.

@gdh1995
Copy link
Contributor

gdh1995 commented Aug 23, 2018

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.

@smblott-github
Copy link
Collaborator

Maybe we can add a keydown handler to grab the next Esc...

Yes.

@rnmhdn
Copy link
Author

rnmhdn commented Mar 7, 2020

no news? :D

@BachoSeven
Copy link

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)

@gdh1995
Copy link
Contributor

gdh1995 commented Jul 10, 2021

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.

@ropery
Copy link

ropery commented Jan 22, 2024

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.

  1. With the LinkHints.activateMode action=hover command, pressing Esc closes the preview.
  2. But with LinkHints.activateModeToOpenInNewTab (bound to F by default; opens a new tab for link in the background), the preview does not close with Esc.

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.)

@philc
Copy link
Owner

philc commented Jan 26, 2024

@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?

@philc philc changed the title firefox - Wikipedia preview Wikipedia and Github Issue preview popups linger after using LinkHints.activateModeToOpenInNewTab Jan 26, 2024
@philc philc added the verified label Jan 26, 2024
@philc philc changed the title Wikipedia and Github Issue preview popups linger after using LinkHints.activateModeToOpenInNewTab Wikipedia and Github Issue preview popups remain open after using LinkHints.activateModeToOpenInNewTab Jan 26, 2024
@gdh1995
Copy link
Contributor

gdh1995 commented Feb 10, 2024

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.

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

Successfully merging a pull request may close this issue.

6 participants