移动 Safari - 显示控制台?
为了防止页面的默认滚动,我在正文上添加了“touchstart”事件的事件侦听器并调用 event.preventDefault()
这工作正常,但我现在无法访问调试控制台因为它需要页面拖动?还有其他人遇到过这个问题并想出解决方法吗?
To prevent the default scrolling of a page I'm adding an event listener for "touchstart" events on the body and calling event.preventDefault()
This works fine but I now can't access the debug console as it requires a page drag? Has anyone else had this problem and come up with a work around?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嗯,有趣。也许您可以将绑定的范围限制到页面的较小区域,比如说页面上的“内部 div”,而不是“外部 div”?然后,也许您可以在它们之间留出少量的空间以便调用控制台?
Hmm, interesting. Perhaps you can limit the scope of the bind to a less-encompassing region of the page, let's say an 'inner div' on the page, but not an 'outer div'? Then, perhaps you can leave yourself a small amount of margin between them for you to invoke the console?
我建议在 url 中添加一个参数,您可以通过该参数重新激活滚动
i would suggest adding a parameter to the url by which you can reactivate scrolling