Dogfalo / materialize

Materialize, a CSS Framework based on Material Design
https://materializecss.com
MIT License
38.86k stars 4.74k forks source link

Tooltip in Microsoft Edge browser goes to top of the page #6112

Open v-zmiycharov opened 6 years ago

v-zmiycharov commented 6 years ago

materialize-tooltip

Expected Behavior

Tooltip should be located relevant to origin button.

Steps to Reproduce (for bugs)

  1. Browser: Microsoft Edge.
  2. Enough content before the tooltip so that the page can be scrolled.
  3. Scroll down a little bit
  4. Hover on tooltip origin button.
  5. The tooltip appears at the top of the page.
DanielRuf commented 6 years ago

Please provide a codepen so we can reproduce this. You might need position: relative; on its parent element.

iv-mexx commented 6 years ago

The same issue occurs in Safari Version 12.0 (13606.2.11)

https://codepen.io/iv-mexx/pen/yxZwYG

Albert-Jan commented 5 years ago

Any updates regarding this issue as it still seems to happen?

DanielRuf commented 5 years ago

Any updates regarding this issue as it still seems to happen?

No, as you can see there was no progress. Do you use Materialize v1.x?

Albert-Jan commented 5 years ago

Hi! Yep, I'm using the 1.0.5 startup theme which I bought from the website and is on 1.0.0 (if I remember correctly). Is there anything else you need for recreating the issue? Or is the issue known and reproducible with the devs?

itsmanuelrc commented 5 years ago

Did you find a workaround for this?

ydax commented 4 years ago

I'm having the same problem in Chrome Version 78.0.3904.97

SaiSubramanian1991 commented 4 years ago

To fix Edge tooltip issue, search for method "_repositionWithinScreen". In that method definition, change this var edges = M.checkWithinContainer(document.body, bounding, offset); to var edges = M.checkWithinContainer(document.documentElement, bounding, offset);

SprouterB commented 4 years ago

The above fixed it for me in Edge, but then broke it in Chrome, so I had to keep both options: if ((navigator.userAgent.indexOf("Edge") != -1 )){ var edges = M.checkWithinContainer(document.documentElement, bounding, offset); } else { var edges = M.checkWithinContainer(document.body, bounding, offset); }