compute-scroll-into-view
compute-scroll-into-view copied to clipboard
scroll to the wrong position when in iframe
- chrome 83.0.4103.106 on Mac
- [email protected]

- button[click to scroll]: scroll by this scroll-into-view-if-needed
- button[click to scroll by brower API]: scroll by native Element.ScrollIntoViewIfNeeded
reproduction: https://codesandbox.io/s/elegant-cdn-75n62
Hi, I have fixed the similar issue in https://github.com/magic-akari/seamless-scroll-polyfill/commit/a7409a3b5ce5629cdcfde729aa84df3278b4308e .
Try: https://codesandbox.io/s/autumn-http-zcwn0
Hope this helps.