Scrolling with mouse-wheel does not reposition mouse-tracking tip #414
Comments
Seems to adjust properly here: http://jsfiddle.net/fDavN/5092/ |
It takes two links to get the effect I'm referring to: Put the mouse on the top link, scroll down with the mousewheel so the cursor ends up on the bottom link. The new tooltip (for the bottom link) will show up in the location where the old tooltip (for the top link) showed up, instead of repositioning to the new location of the cursor. Only when I actually move the mouse cursor (without using the scroll wheel), does it position itself relative to the new location of the mouse cursor. It has this effect for me in Firefox, Safari, IE9, Opera (all in Win7). Here's an illustration of what happens: |
Looks like it's to do with the fact that the scrolling causes you to mouse onto the tooltip, so it doesn't register it leaving the element... must be a bug in the tracking code. I'll look into this. |
Hmmm, it seems the issue is still there with nightly-19317041b8 (either in the fiddle or locally with updated files): I still get the behavior as displayed in the screenshots in the post above. Am I doing something wrong? |
Definitely seems to be working for me. Ensure you've cleared your cache and try again. |
The behavior looks to be browser-dependent. Cleared all local content/cache and tried with a bunch of them: Chrome: behaves entirely as it should; definitely working. Perhaps it's just (some) browsers being quirky? |
Unfortunately this looks to be a side-effect of the fact onl Chrome and Opera seem to fire mousemove onscroll :( and since the scroll event doesn't provide the pageX/pageY properties there's no way to determine the current mouse position. |
Okay -- not surprised that they screwed the pooch on IE, but I'd expected FF/Saf to be more sensible in this respect. I know enough, thanks. |
Actually, I figured out a cross-browser way to fix this :) Try it out and let me know! |
Tested in the browsers that had problems before: Safari, IE9: works fine now, miniscule delay, but definitely fixed. Firefox: doesn't work like Chrome/Saf/IE, but there is a change: Initially, after mouse-scrolling so the cursor moves from one tooltip trigger to the next, the tooltip shows in the wrong place (the tooltip for trigger 2 shows in the place that the tooltip for the first trigger appeared before scrolling). However, when scrolling again, away from the new location (in any direction), the tooltip does reposition correctly. After that, it seems to reposition correctly, until the mouse itself is moved and the initial failure repeats. Pretty weird. |
Using: position . target: 'mouse'.
Works fine when the mouse cursor is moved directly.
When showing a tooltip, then using the scroll wheel (while not moving the mouse itself), does not reposition tooltip to new location of cursor (relative to page).
If scrolling that way lands the cursor on a different qTip-trigger, it will show that tooltip in the old location (pre-scrollwheel-use) aswell.
Location of tooltip only changes after moving the cursor again.
qTip2 settings:
content: {
attr: 'alt'
},
position: {
target: 'mouse'
adjust: { x: 5, y: 25 },
my: 'top center'
},
show: {
delay: 250,
solo: true,
effect: false
}
The text was updated successfully, but these errors were encountered: