Opened 6 years ago

Closed 6 years ago

#14911 closed bug (notabug)

tooltip shouldn't show if another pop-up (e.g. autocomplete) is open

Reported by: astromarshal Owned by:
Priority: minor Milestone: none
Component: ui.tooltip Version: 1.11.3
Keywords: Cc:
Blocked by: Blocking:

Description

If a popup (e.g. auto-complete window) is open, putting cursor on an adjacent object with tooltip will show the tooltip, obscuring the pop-up.

If any pop-up is open, tooltip should only show if the trigger element is a child of the pop-up

This is my current hack:

$.widget( "ui.tooltip", $.ui.tooltip, {
    _open: function() {
        if ($('.ui-autocomplete:visible').length > 0) return false;
        pop = $('.pop:visible');
        if ((pop.length > 0) && ($(pop[0]).find(this.element[0]).length == 0)) {
          return false;
        }
      return this._superApply(arguments);
    }
});

There should also be a ui-pop class that's shared by auto-complete and other popup items (perhaps another bug report?)

Change History (1)

comment:1 Changed 6 years ago by Scott González

Resolution: notabug
Status: newclosed

I disagree that tooltips should be looking at the status of other widgets to determine if they should open. I also think that it would be fairly difficult to properly define what elements should get such a class. What about sticky tooltips (we don't support them, but any solution has to support all third party widgets). What about dialogs? I'm sure there are many other widgets that would have questionable behavior.

I'm also not sure that this is a large problem as the user can simply move their mouse again to get rid of the tooltip.

Finally, Firefox's behavior on this page matches the behavior that exists for our widgets today.

Note: See TracTickets for help on using tickets.