SE Preview on hover

Shows preview of the linked questions/answers on hover

< Commentaires sur SE Preview on hover

Avis: Bon - le script fonctionne correctement

§
Posté le: 2017-03-04
Édité le: 2017-03-04

If you switch tabs then it doesn't work unless you close and reopen the SE tab (Firefox only)

First of all thank you for your script. It's another great work!


I noticed the following issue (Firefox only - it works ok in Chrome with Tampermonkey). STR

  • (in a clean FF 51.0.1 x64 profile with only Greasemonkey 3.10 and your script v0.5.0 or any previous)
  • open http://stackoverflow.com/
  • mouseover on question links: notice that the script works ok.
  • now switch to another tab (or open a new tab) via mouse or Ctrl+Tab while the preview is not visible(=move mouse away from last hovered link) and then return to the SE tab
  • mouseoover on links: the script does't work anymore: there's no preview. Pressing F5 or Ctrl+F5 doesn't fix the problem. There's no related error in Browser Console.

The only solution is to close and reopen the SO tab.

woxxomAuteur
§
Posté le: 2017-03-04

The reason I've added this check was to prevent previewing when the entire browser window isn't focused and the user does something in another smaller application window displayed on top of the browser. However, in Firefox document.hasFocus() reports the document isn't focused after tab switching. Seems like a bug so I've removed the check when running in Firefox, use the updated script.

I also see another issue in Firefox 52 beta for which I don't have a solution yet: after the preview disappears I can't use global browser keyboard shortcuts like Ctrl-Tab or F5 until I click the page. This also looks like a bug in Firefox so I'm reluctant to dig further after several unsuccessful attempts of circumventing it.

§
Posté le: 2017-03-04

Alright, thanks for the update and for the info.

woxxomAuteur
§
Posté le: 2017-03-04
Édité le: 2017-03-04

I've removed the focus check when running in Chrome as well because apparently it's not common practice.

Poster une réponse

Connectez-vous pour poster une réponse.