Skip to content

EuiResizeObserver fallback does not work for pure resizing #3044

@chandlerprall

Description

@chandlerprall

Discovered while working on #2991

Safari and IE11 are the two browsers we support which do not have ResizeObserver. For those, we fall back to a MutationObserver watching for all changes. While that catches when mutation cause a different size, it incorrectly:

  • misses size changes caused by a window resize
  • catches content changes that do not affect size
  • misses size changes caused by changes in a document's CSS

I don't think we should try addressing the third one, but wanted to include it for completeness. The other two should be fixed by changing the fallback to:

  • listen for resize events
  • confirm that a newly computed size is, in fact, different from the previously known one

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions