gpt4 book ai didi

javascript - iOS 溢出元素上的 Cordova Momentum 滚动

转载 作者:行者123 更新时间:2023-12-01 16:29:34 25 4
gpt4 key购买 nike

在 Safari iOS 浏览器中监听滚动事件每次都会触发控制台消息,即使在动量上也是如此,但在 Cordova 构建的应用程序中,只有在滚动停止时才会触发。

el-with-webkit-overflow-scrolling-touch.on('scroll', function()
{ i++; console.log('Scroll: ' + i); }

);

Cordova 应用程序上的 GIF: http://recordit.co/I3eiucGAWd

Safari 浏览器中的 GIF(同一个模拟器): http://recordit.co/QhBNcccjPj

这也发生在真实设备上。

这对我来说似乎是一个错误,但也许有人知道快速破解/修复
此处发布的错误: https://issues.apache.org/jira/browse/CB-9655

最佳答案

有帮助的插件(但需要测试):http://plugins.telerik.com/cordova/plugin/wkwebview

正如这个问题中提到的:Phonegap onscroll not working untill scroll stops并阅读本文:http://developer.telerik.com/featured/scroll-event-change-ios-8-big-deal/

Although Apple implemented this change in iOS Safari, as well as its new WKWebView control, it did not change the scroll behavior in its old UIWebView control. And because of a major bug in the replacement WKWebView control, the Cordova team cannot upgrade to WKWebView yet.

This means that at the moment Cordova apps running on iOS 8 continue to pause JavaScript execution, and will continue to until Cordova can upgrade. And this doesn’t just affect Cordova apps. Any iOS app that uses web views — including Facebook, Twitter, and Chrome for iOS — will get the old behavior until they upgrade their apps to WKWebView. So yes, that means you could get different behavior opening the same URL from different iOS apps depending on which API they use internally.

关于javascript - iOS 溢出元素上的 Cordova Momentum 滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32567113/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com