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

Causes endless loop in IE10 #26

Open
peterhass opened this issue Nov 15, 2019 · 0 comments
Open

Causes endless loop in IE10 #26

peterhass opened this issue Nov 15, 2019 · 0 comments

Comments

@peterhass
Copy link

I had a issue in IE10 with high cpu usage and flickering elements so did some profiling of the app and noticed a endless loop in vue-clamp.

I cannot fully say what causes the problem because IE developer tools are outright horrible but those are my findings:

  • element.resize gets triggered, handler calls vue-clamp to update
  • vue-clamp updates text in DOM
  • DOMSubtreeModified gets triggered, handler calls vue-clamp to update
  • vue-clamp updates text in DOM
  • DOMSubtreeModified gets triggered, handler calls vue-clamp to update
  • and so on ...

Maybe the real problem lies with resize-detector by not properly detecting resize loops.

Anyway, here is my workaround:
Add resize-observer-polyfill package

import ResizeObserver from "resize-observer-polyfill"

if (!("ResizeObserver" in window)) {
  window.ResizeObserver = ResizeObserver
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant