Opened 9 years ago

Last modified 9 years ago

#8544 closed bug

Unable to update tooltip content dynamically — at Initial Version

Reported by: anvk Owned by:
Priority: minor Milestone: git
Component: ui.tooltip Version: 1.9.0-rc.1
Keywords: Cc:
Blocked by: Blocking:


Example of the issue could be found here:[[BR]]

Browsers tried:
Firefox 15.0, Chrome Version 21.0.1180.82, Safari 6.0, Opera 12.01
OS: 10.7.4
JQuery UI: Tried both 1.9rc1 and 1.9m1

Steps to reproduce: Create an html page with one single button on it

  1. Create a tooltip for the button with a default text "before click!"
  2. Create a function which will update tooltip's text to say "after click!" using tooltip's content option. Attach this new function to the button's click event.

This could be achieved by adding code like this:

var createContentFunc = function (content) {
    return typeof content === "function" ? content : function () {
         return content;

myButton.tooltip("option", "content", createContentFunc("after click!"));
  1. Hover mouse cursor over the button. Observe a tooltip saying "before click!"
  2. Click the button so that a dynamic tooltip text would trigger. Do not remove the mouse cursor from the button.

(Expected) tooltip's text is "after click!"
(Observed) tooltip's text is "before click!"

  1. Now remove the mouse from the button so that tooltip will disappear.
  2. Hove mouse cursor over the button again and observe a proper tooltip being set

(Expected) tooltip's text is "after click!"
(Observed) tooltip's text is "after click!"

This scenario could be found in the example link mentioned above.

Change History (0)

Note: See TracTickets for help on using tickets.