-
Notifications
You must be signed in to change notification settings - Fork 532
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
Annotator hover behaviour is too sticky #222
Comments
I agree. Would you like to contribute a patch? |
Can you point me to the place in the code that sets the hover handler? |
https://github.com/okfn/annotator/blob/cfbd11c903/src/annotator.coffee#L530 Edited so the link doesn't break as we change the file -- Nick |
So, I'm not necessarily sure that the current behaviour is perfect, but it was added for a very specific reason, namely: it was far too easy to mouse off the viewer while trying to get the cursor up to the controls ("edit", "delete", etc.). The viewer "hide timeout" as it's referred to in the code, was an attempt to emulate the behaviour of contextual menus on Mac OS X, where when dragging the cursor from menu to submenu, the cursor is allowed to go completely outside the bounds of the menus (and even over other menu items) for a short while, before the submenu is hidden. If you think the current behaviour is too "sticky", I'd be interested in hearing the result of trying a bunch of different values of |
@nickstenning the particular request here is not exactly for a change in timeout. @hekevintran noticed that there is no amount of time after which a the currently hovered annotation will be shown if the viewer is still stuck on a previous annotation because the user moved the mouse from one to another in < A simple fix would be to always set the viewer hide timeout, but check, when it fires, if it should actually hide or if maybe a new viewer should be shown, etc. I've been leaving this open because I want @hekevintran to try. Any luck? |
Hi @tilgovi @nickstenning, I am interested in resolving this issue, but it is not a huge priority and at the moment I don't have the time to get into it. |
Backporting the fix for #222 to 1.2.x
I noticed an issue when using Annotator. If I have a page with multiple annotations such as the canonical demo page, http://okfnlabs.org/annotator/demo/, and quickly move my mouse cursor between annotations, the popup stays on the first annotation.
I was able to narrow this problem down to this line: https://github.com/okfn/annotator/blob/16e3331e6392b085225ca0d0bb4d6333ae881d97/src/annotator.coffee#L496
It seems that Annotator checks if the cursor is over an annotation and if it is not, the popup gets hidden. However it seems that Annotator does not check if the annotation the mouse cursor is hovering over is the same as the annotation that it started on.
Maybe this behaviour is on purpose, but it is definitely confusing. In my opinion, if I move the cursor to another annotation I should see the popup associated with that annotation and the popup of the previously hovered over annotation should be hidden.
The text was updated successfully, but these errors were encountered: