Skip to main content

Search and Top Navigation

#14911 closed bug (notabug)

Opened January 29, 2016 06:30AM UTC

Closed January 30, 2016 12:30AM UTC

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?)

Attachments (0)
Change History (1)

Changed January 30, 2016 12:30AM UTC by scottgonzalez comment:1

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.