react-zoom-pan-pinch icon indicating copy to clipboard operation
react-zoom-pan-pinch copied to clipboard

Panning does not work in external window

Open yangwooseong opened this issue 6 months ago • 0 comments

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

  1. in operation returns true regardless of shadowRoot even though the value is null so I think nullability has to be checked.
  2. If it's on the shadowRoot or external window, instance of Element is always false because every environment has its own internal class.

yangwooseong avatar Jun 16 '25 06:06 yangwooseong