Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip2/Popover2 cause infinite loop when Chrome is zoomed out to or past 75% #2029

Closed
tyscorp opened this issue Jan 24, 2018 · 16 comments
Closed

Comments

@tyscorp
Copy link
Contributor

tyscorp commented Jan 24, 2018

Bug report

  • Package version(s): v1.x and v2.x
  • Browser and OS versions: Chrome 63, MacOS X 10.13.

Steps to reproduce

  1. Zoom Chrome out to at least 75%
  2. Open a Tooltip2 or Popover2

This is reproducible on the blueprint v2 docs with the "Hover and click me" button when you click it.

A quick "fix" is to disable zooming on Chrome by setting document.body.style.zoom to 1 / window.devicePixelRatio initially and every resize.

Actual behavior

Chrome freezes at 100% CPU usage with no console error.

This error is very inconsistent and appears to depend on the size of the popover/tooltip. I have a feeling this is related to Popper.js. Perhaps this issue?

@giladgray
Copy link
Contributor

oh yeah total repro, straight to crash city :(
very likely this is related to that Popper.js issue floating-ui/floating-ui#496, but i'll leave this open to redirect.

@atomiks
Copy link

atomiks commented Mar 12, 2018

FWIW, this doesn't seem to happen with my lib which uses Popper.js.

https://atomiks.github.io/tippyjs/

@tnrich
Copy link
Contributor

tnrich commented Mar 12, 2018

@giladgray I just spent a long time trying to track down this bug which occurs for certain tooltips but not others. Very confusing.

It seems like it is probably a popper.js issue, but is there something blueprint can do in the meantime to make it so users don't hit this? Maybe temporarily apply the quick fix above:

A quick "fix" is to disable zooming on Chrome by setting document.body.style.zoom to 1 / window.devicePixelRatio initially and every resize.

@giladgray
Copy link
Contributor

@tnrich awesome, thanks for tracking that down! a fix like you suggest certainly does not belong in a library like Blueprint; it belongs in your app initialization code. we can't ban zooming across the board!

@tnrich
Copy link
Contributor

tnrich commented Mar 12, 2018

@giladgray I wasn't suggesting that this be a permanent solution, but I do think having it in there until popperjs gets fixed would be a net benefit to blueprint users. Otherwise you'll have some very confusing and buggy behavior.

Or help fix popper :)

Your call of course still though.

@tyscorp
Copy link
Contributor Author

tyscorp commented Mar 12, 2018

@tnrich The fix I posted above doesn't work on Retina displays on Mac.

@giladgray
Copy link
Contributor

@tnrich that's the kind of fix that belongs in your app initialization code, not as a side effect from a library import.

@tnrich
Copy link
Contributor

tnrich commented Apr 4, 2018

This seems to have stopped happening for me. Anyone else not getting this anymore?

@giladgray
Copy link
Contributor

I'm not seeing it either!

@llorca
Copy link
Contributor

llorca commented Apr 4, 2018

fixed by popper? should we close?

@marvinsum
Copy link
Contributor

@giladgray I think we're still seeing this issue on Chrome 70, Mac OS High Sierra.

@adidahiya
Copy link
Contributor

Going to close this issue, please open a new one with more details about the exact Popover/Tooltip API usage (and ideally a codesandbox repro) if you still see this.

@schlosna
Copy link

Possibly related to floating-ui/react-popper#320

@jalessio
Copy link

jalessio commented Dec 6, 2019

@schlosna Relating that in our case the fix proposed in floating-ui/react-popper#320 addressed the issue described here for our app which utilizes Blueprint.

@schlosna
Copy link

schlosna commented Dec 6, 2019

@adidahiya we should probably reopen this to track @mfedderly ’s upstream popper fix to merge & release.

@adidahiya
Copy link
Contributor

fixed by #3885

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants