Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#8703 closed bug (cantfix)

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.

Change History (10)

comment:1 Changed 7 years ago by mikesherov

Priority: minorundetermined
Status: newopen

comment:2 Changed 7 years ago by mikesherov

Priority: undeterminedminor

comment:3 Changed 7 years ago by Jörn Zaefferer

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/

comment:4 Changed 7 years ago by drew.waddell

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?

comment:5 Changed 7 years ago by Scott González

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

comment:6 Changed 7 years ago by drew.waddell

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

comment:7 Changed 7 years ago by Jörn Zaefferer

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

comment:8 Changed 7 years ago by Scott González

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

comment:9 Changed 7 years ago by Scott González

Keywords: needsdocs added

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

Keywords: needsdocs removed
Note: See TracTickets for help on using tickets.