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

useResize: ResizeObserver loop completed with undelivered notifications. #181

Open
axcr opened this issue Jan 5, 2022 · 1 comment
Open

Comments

@axcr
Copy link

axcr commented Jan 5, 2022

Hi Guys,

simple use of useResize shows "ResizeObserver loop completed with undelivered notifications." error in browser console.

import { Controller } from 'stimulus'
import { useResize } from 'stimulus-use'

export default class extends Controller {
  static targets = ['width']

  connect() {
    useResize(this)
  }

  resize({ width }) {
    this.element.style.height = width + 'px'
  }
}

Any suggestions to avoid such message?

Thx!

@Sub-Xaero
Copy link
Contributor

@axcr This seems to be a warning Safari gives when elements are resized inside the callback, especially when that triggers another resize.

I've done some testing and I can reproduce the warning, but it doesn't seem to be anything we can do anything about. If your app is working as expected, then I'd suggest ignoring the warning.

@marcoroth marcoroth changed the title ResizeObserver loop completed with undelivered notifications. useResize: ResizeObserver loop completed with undelivered notifications. Aug 6, 2022
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

2 participants