react-zoom-pan-pinch
react-zoom-pan-pinch copied to clipboard
Panning does not work in external window
Describe the bug
Panning does not work in external window.
To Reproduce Steps to reproduce the behavior: You can reproduce in https://codesandbox.io/s/still-leaf-t3shu (which is originally posted in https://github.com/BetterTyped/react-zoom-pan-pinch/issues/93)
Expected behavior Panning should work in external window.
Additional context I have done some test in cloned repo in dev mode, and I noticed diff in https://github.com/BetterTyped/react-zoom-pan-pinch/pull/448/files may not be correct change.
https://github.com/BetterTyped/react-zoom-pan-pinch/blob/a0dac6989d3956eb1ab92661bd37896dae7b10ed/src/core/pan/panning.utils.ts#L19-L28
inoperation returns true regardless of shadowRoot even though the value is null so I think nullability has to be checked.- If it's on the shadowRoot or external window,
instance of Elementis alwaysfalsebecause every environment has its own internal class.