microsoft/YamUI

Visibility Observer Doesn't Work on Edge 15 With Zero Area Element

Opened this issue · 0 comments

Edge 15 is unable to support intersection observer when the element passed has 0 area: researchgate/react-intersection-observer#16

Ran into this when wanting to use an observer to execute a callback and wasn't passing any element to render, so by default an empty div is created. That works fine on other browsers, but Edge is unable to implement the intersection observer with a 0 area element. Workaround was to pass a 1x1 element to render on enter and leave.

Is this a workaround that we'd be interested in implementing at the YamUI level? Maybe if a user doesn't pass an element then by default we create a 1x1 div. Or should the enter and leave elements be required?