Tooltip Example is Broken(w/proposed fix) #1942

Open
rob2d opened this Issue Aug 17, 2014 · 0 comments

Projects

None yet

1 participant

@rob2d
rob2d commented Aug 17, 2014

Hi,

Just wanted to let you know that the tooltip in the example at

https://yuilibrary.com/yui/docs/overlay/overlay-tooltip.html

isn't really functional. If you highlight a div and quickly hover off, it actually inverts the functionality of the tooltip to show when not selected. This can be easily fixed. In the timeout's callback under the

" // wait half a second, then show tooltip" comment,

add a line anywhere in the function with the statement
waitingToShow = false

A corollary to that which would make the example much more clear would be to put the statement
// while waiting to show tooltip, don't let other
// mousemoves try to show tooltip too.
waitingToShow = true;

above the setTimeout call.

Could save a lot of headache for somebody trying to get a very common functionality in their app.

Thanks.

Robert Concepcion III

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment