Skip to main content

Search and Top Navigation

#8925 closed bug (fixed)

Opened December 19, 2012 03:21PM UTC

Closed January 06, 2014 03:14PM UTC

Last modified January 06, 2014 03:15PM UTC

Tooltip: Changes to title attribute while tooltip is open get reverted on close

Reported by: jzelos Owned by:
Priority: minor Milestone: 1.11.0
Component: ui.tooltip Version: 1.9.2
Keywords: Cc:
Blocked by: Blocking:
Description

When a tooltip is displayed on screen any changes to the title attribute of the element are ignored. This is apparent in Firefire 17 and Chrome 23.

See http://jsfiddle.net/wvRhb/ for a small proof.

Attachments (0)
Change History (13)

Changed December 19, 2012 03:45PM UTC by tj.vantoll comment:1

resolution: → notabug
status: newclosed

Changed January 07, 2013 02:47PM UTC by jzelos comment:2

Ah, ok, I assumed it would handle changes to the title attribute, my mistake.

One thing that remains a concern, is that it overwrites any change made to the title attribute when closing. I've updated the original fiddle to demonstrate, change the value with the tooltip on screen then click out of the input to see the value change from title1 to title2 and then back to title1 when the tooltip closes.

Changed January 07, 2013 02:49PM UTC by jzelos comment:3

Sorry, didn't realise jsfiddle did change tracking, use http://jsfiddle.net/wvRhb/4/.

Changed January 07, 2013 03:03PM UTC by scottgonzalez comment:4

Why are you doing this?

Changed January 08, 2013 04:11PM UTC by jzelos comment:5

_comment0: The title/tooltip initally shows an explanation of what should go in the field. I'm then reusing the tooltip to display an error message from a validation function then restoring the original title when the error is resolved. \ 1357661583638361

The title/tooltip initally shows an explanation of what should go in a form field. I'm then reusing the tooltip to display an error message from a validation function before restoring the original title when the error is resolved.

Changed March 25, 2013 12:43PM UTC by scottgonzalez comment:6

#9181 is a duplicate of this ticket.

Changed March 25, 2013 12:46PM UTC by scottgonzalez comment:7

milestone: 1.10.0
resolution: notabug
status: closedreopened
summary: Cannot change title when tooltip is openTooltip: Changes to title attribute while tooltip is open get reverted on close

Re-opening to investigate whether we handle this. When restoring any title, we can check if the element already has a title. If it does, then it's a newly set value and we should leave it alone.

This won't cause the tooltip to change while open (which is why this was closed in the first place), but it would prevent "disappearing" values.

Changed March 25, 2013 12:47PM UTC by scottgonzalez comment:8

status: reopenedopen

Changed October 10, 2013 11:58AM UTC by scottgonzalez comment:9

#9595 is a duplicate of this ticket.

Changed November 26, 2013 07:18AM UTC by robotdan comment:10

_comment0: > Re-opening to investigate whether we handle this. When restoring any title, we can check if the element already has a title. If it does, then it's a newly set value and we should leave it alone. \\\\ \\\\ This won't cause the tooltip to change while open (which is why this was closed in the first place), but it would prevent "disappearing" values. \ \ \\\\ \ I submitted a pull request that will attempt to preserve changes to the title attribute made between the tooltip open and close. \ https://github.com/jquery/jquery-ui/pull/11411386044093458785
Re-opening to investigate whether we handle this. When restoring any title, we can check if the element already has a title. If it does, then it's a newly set value and we should leave it alone. \\\\ \\\\ This won't cause the tooltip to change while open (which is why this was closed in the first place), but it would prevent "disappearing" values.

\\\\

I submitted a pull request that will attempt to preserve changes to the title attribute made between the tooltip open and close.

https://github.com/jquery/jquery-ui/pull/1146

Changed December 02, 2013 04:57AM UTC by robotdan comment:11

_comment0: Submitted an updated pull request. \ https://github.com/jquery/jquery-ui/pull/11431386044140757881

Changed January 06, 2014 03:14PM UTC by Daniel DeGroff comment:12

resolution: → fixed
status: openclosed

Tooltip: On close and destroy only set title if empty or undefined

Ticket #8925 states that changes to the title attribute while the

tooltip is open are lost on tooltip close.

In the close and destroy functions, the title attribute is always

written if a value was stored in the element on open. It is possible

the attribute has changed and restoring the initial value may overwrite

the current value.

If the value is empty or undefined as set in open, do not set the title

attribute.

This fix has the limitation that if the user removed the title

attribute or set the value to an empty string the original title value

would be restored on close and destroy.

Fixes #8925

Changeset: af85dfcafb32b7503392ca834eaa9d3162d54b28

Changed January 06, 2014 03:15PM UTC by jzaefferer comment:13

milestone: → 1.11.0