Open tony1377 opened 4 years ago
I cannot reproduce on an iPhone 11 running iOS 13.3 in the simulator - does this only occur on real devices?
I don't have access to many simulators via browser stack.
I can replicate it on real devices for
Ok I will try it out on a real iPhone running iOS 13 and will see if I can reproduce
It doesn't occur on ios 13 from what I could see, but it does on ios 12 & 11. Do you have access to those?
Looks like https://geyh3.csb.app/ is broken?
ah, looks like codesandbox have changed something about how they generate their urls, the same example now lives at https://geyh3.codesandbox.io/
Okay I can confirm the issue occurs on iOS 12.4 but not iOS 13.3, on the iPhone simulator. Seems like more a bug with iOS than a bug with this library, and it's something of an edge case too - do you mind if I close this issue, seeing as it will be fixed with time? Unless you want to submit a PR...
Unfortunately I don't have time for that, might be worthwhile keeping this open incase others find workarounds later though?
嗨,不错的库,它似乎涵盖了大多数滚动锁定问题,但我注意到在文本字段上启动滚动的 ios 错误并没有阻止 atm。
这是一个测试用例https://geyh3.csb.app/
重现步骤:
- 使用 Safari 或 iphone 6s、ios 12、safari 在 iphone 6 ios 11 中打开附带的测试用例
- 点击“启动演示模式”按钮。
- 点击第二个文本字段。
- 输入一些文本。
- 点击完成按钮。
- 执行向下滚动手势(即向上轻弹手指),但在第二个文本字段的范围内开始滚动手势。
实际结果:向下 滚动
<body>
。预期结果: 黄色
<div>
(它是 position:fixed 的后代<div>
)应该向下滚动。根本不应该滚动,因为它的样式 为<body>``overflow:hidden.
原始 Safari 错误报告 - https://bugs.webkit.org/show_bug.cgi?id=153856
They stopped the repairs. I had to do it myself, in the same way, with a new version of typeScript. And fix these problems for everyone to use. add react hooks、vue3 example
npm i body-scroll-lock-upgrade
repair log,Refer to the releases page.
Hi, nice lib, seems like it covers most scroll locking issues but I noticed that the ios bug where scroll is initiated on a text field isn't prevented atm.
Here's a test case https://geyh3.csb.app/
Steps to reproduce:
Actual result: The
<body>
scrolls downward.Expected result: The yellow
<div>
(which is a descendant of a position:fixed<div>
) should scroll downward. The<body>
shouldn't scroll at all, because it's styled asoverflow:hidden.
Original safari bug report - https://bugs.webkit.org/show_bug.cgi?id=153856