Opened 10 years ago

Closed 10 years ago

#9214 closed bug (notabug)

Track does not work when manually opening Tooltip

Reported by: mattblang Owned by: mattblang
Priority: minor Milestone: none
Component: ui.tooltip Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:

Description

If I try to manually spawn a Tooltip using

.tooltip("open")

after I have initialized with

track: true

the mouse tracking will not work.

Also see this fiddle.

Change History (3)

comment:1 Changed 10 years ago by tj.vantoll

Owner: set to mattblang
Status: newpending

Hi mattblang,

Thanks for taking the time to contribute to the jQuery UI project. I see the behavior you're describing, here's an updated test case against master: http://jsfiddle.net/tj_vantoll/kHYdf/.

That being said this is a very strange use case because you are creating the tooltip on hover of the element itself, whereas normally you'd just want the tooltip to be setup before the element is hovered over. If you just want to update the content you can do that with the content option. Here's an example of that: http://jsfiddle.net/tj_vantoll/VBNeS/.

Is there a reason you need to create the tooltip on hover?

comment:2 Changed 10 years ago by mattblang

Status: pendingnew

Hello TJ!

I am using jQuery UI for my interface on a WebGL project. I was hoping I could test for object intersection in WebGL and display Tooltips when certain interactions occur (such as mousing over a planet sphere). The Tooltip would need to be attached to the HTML5 canvas, which takes up the entire screen.

I don't need to create the Tooltip on hover. I just set that up as a simple use case. I need to be able to manually open the Tooltip with mouse track working correctly.

Last edited 10 years ago by mattblang (previous) (diff)

comment:3 Changed 10 years ago by Scott González

Resolution: notabug
Status: newclosed

This is working as intended. Tracking tooltips only apply when the opening is caused by the pointer. Even without manually opening a tooltip, if a tracking tooltip is opened via focus, it won't track.

You'll need to implement the tracking logic yourself, though it's a bit tricky to get right.

Note: See TracTickets for help on using tickets.