]> source.dussan.org Git - jquery-ui.git/commit
Tooltip: On close and destroy only set title if empty or undefined
authorDaniel DeGroff <djdegroff@gmail.com>
Tue, 3 Dec 2013 04:03:55 +0000 (22:03 -0600)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 6 Jan 2014 15:10:02 +0000 (16:10 +0100)
commitaf85dfcafb32b7503392ca834eaa9d3162d54b28
tree9f01beeb1794a9df54d38a64bf00b4b23f7a5d7f
parentb9e438d07c370ac2d4b198048feb6b6922469f70
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
tests/unit/tooltip/tooltip_methods.js
ui/jquery.ui.tooltip.js