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 comment:1
resolution: | → notabug |
---|---|
status: | new → closed |
Changed January 07, 2013 02:47PM UTC by 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 comment:3
Sorry, didn't realise jsfiddle did change tracking, use http://jsfiddle.net/wvRhb/4/.
Changed January 07, 2013 03:03PM UTC by comment:4
Why are you doing this?
Changed January 08, 2013 04:11PM UTC by 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:46PM UTC by comment:7
milestone: | 1.10.0 |
---|---|
resolution: | notabug |
status: | closed → reopened |
summary: | Cannot change title when tooltip is open → Tooltip: 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 comment:8
status: | reopened → open |
---|
Changed November 26, 2013 07:18AM UTC by 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/1141 → 1386044093458785 |
---|
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.
Changed December 02, 2013 04:57AM UTC by comment:11
_comment0: | Submitted an updated pull request. \ https://github.com/jquery/jquery-ui/pull/1143 → 1386044140757881 |
---|
Changed January 06, 2014 03:14PM UTC by comment:12
resolution: | → fixed |
---|---|
status: | open → closed |
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 comment:13
milestone: | → 1.11.0 |
---|
You need to use the content option - http://jsfiddle.net/tj_vantoll/9cV3n/.