Skip to main content

Search and Top Navigation

#8703 closed bug (cantfix)

Opened October 19, 2012 03:10PM UTC

Closed October 19, 2012 11:41PM UTC

Last modified October 26, 2012 02:20PM UTC

Tooltip: Native tooltip is displayed for disabled tooltipped element

Reported by: drew.waddell Owned by:
Priority: minor Milestone: 1.10.0
Component: ui.tooltip Version: 1.9.0
Keywords: Cc:
Blocked by: Blocking:
Description

Example: http://jsfiddle.net/dwaddell/p5j69/

Seems to be an issue in all major browsers.

Attachments (0)
Change History (10)

Changed October 19, 2012 08:56PM UTC by mikesherov comment:1

priority: minorundetermined
status: newopen

Changed October 19, 2012 09:01PM UTC by mikesherov comment:2

priority: undeterminedminor

Changed October 19, 2012 11:41PM UTC by jzaefferer comment:3

resolution: → cantfix
status: openclosed

A disabled button doesn't trigger any JavaScript events, therefore we can't remove the title attribute when hovering the disabled button. There's no way to fix this within the tooltip widget.

Simple workaround: Disable the tooltip widget. See http://jsfiddle.net/E7Sza/

Changed October 22, 2012 12:11PM UTC by drew.waddell comment:4

I see no difference in the code from my example and your workaround, did you forget to set the base after forking my jsfiddle?

But basically you are saying every time you set the enablibilty of an element that is tooltipped you are also going to have to set the enablitiy of the tooltip?

Changed October 22, 2012 12:15PM UTC by scottgonzalez comment:5

Read Jörn's comment again. Disabled elements don't trigger events. It is impossible for us to implement any behavior at all.

Changed October 22, 2012 12:44PM UTC by drew.waddell comment:6

Ah, I gotcha, one last question, sorry for piling on this ticket.

I assume Jörn did this which works: "$('#First').button('disable').tooltip('disable');" (http://jsfiddle.net/dwaddell/E7Sza/2/). Why doesn't

"}).tooltip({disabled :true});" work (http://jsfiddle.net/dwaddell/E7Sza/1/)?

Thanks for all you guys do, you and Jörn are amazing at this stuff,

Drew

Changed October 22, 2012 01:20PM UTC by jzaefferer comment:7

Sorry, meant to post this: http://jsfiddle.net/E7Sza/3/ - what you figured out already.

Changed October 22, 2012 02:46PM UTC by scottgonzalez comment:8

Drew: The problem is that initializing a tooltip as disabled isn't working properly. I filed a separate ticket for that: #8712

Changed October 26, 2012 12:41PM UTC by scottgonzalez comment:9

keywords: → needsdocs

Changed October 26, 2012 02:20PM UTC by scottgonzalez comment:10

keywords: needsdocs