chinchang / hint.css

A CSS only tooltip library for your lovely websites.

Home Page:https://kushagra.dev/lab/hint/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tooltips can interfere with each other if their 'parent' objects are in each others tooltip display area

jskirst opened this issue · comments

Example

If you have two buttons, one on top of the other, and they both have tooltips, the button below will appear in front of the tooltip for the button above.

screen shot 2013-07-26 at 10 03 41 am

If you remove the tooltip from the button below, the tooltip above works fine as you'd expect.

screen shot 2013-07-26 at 10 04 33 am

Not sure what can be done here other than manually specifying z-indexes for each tooltip.

Current work around is pretty heavy handed, but it gets the job done:

 $("[class*='hint--']").hover(
  function(){
    $("[class*='hint--']").css("z-index", 0);
    $(this).css("z-index", 88888888);
  }, function(){
    $("[class*='hint--']").css("z-index", 88888888);
  }
);

Hey @jskirst Can we have a reduced test case to see the issue on cssdeck/codepen?

Just tried, proved impossible. Went back and found a lurking css change in my own code to .hint z-index that caused the issue. Sorry about that.

Move along, nothing to see here.