iOS溢出元素上的Cordova动量滚动

问题描述:

在Safari iOS浏览器中收听滚动事件每次都会触发控制台消息,即使在动量时也是如此,但是在cordova内置的应用程序中,该消息仅在滚动停止时才触发.

Listening to scroll events in Safari iOS browser triggers the console message every time, even on the momentum, but in the cordova built app that triggers only when the scroll has stopped.

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

);

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

GIF on the cordova app: http://recordit.co/I3eiucGAWd

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

GIF in Safari browser (same emulator): http://recordit.co/QhBNcccjPj

这也发生在真实设备上.

This happens on the real device too.

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

This looks like a bug to me, but maybe somebody knows a quick hack/fix Bug posted here: https://issues.apache.org/jira/browse/CB-9655

有助于(但需要测试)的插件:

Plugin that helps (but needs testing): http://plugins.telerik.com/cordova/plugin/wkwebview

此问题中提到: Phonegap滚动在滚动停止之前不起作用并阅读本文: http://developer.telerik.com/featured/scroll-event-change-ios-8-big-deal/

As mentioned in this question: Phonegap onscroll not working untill scroll stops and read in this article: http://developer.telerik.com/featured/scroll-event-change-ios-8-big-deal/

尽管Apple在iOS Safari中以及在其Safari中实现了此更改 新的WKWebView控件,它没有更改其滚动行为 旧的UIWebView控件.并且由于替换中的重大错误 WKWebView控件,Cordova团队尚无法升级到WKWebView.

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.

这意味着目前在iOS 8上运行的Cordova应用仍在继续 暂停JavaScript执行,并将一直持续到Cordova可以执行 升级.这不仅会影响Cordova应用程序.任何具有以下功能的iOS应用 使用网络视图(包括Facebook,Twitter和iOS的Chrome) 在他们将应用程序升级到WKWebView之前,它将保持旧的行为. 所以是的,这意味着您可能会在打开相同的按钮时得到不同的行为 来自不同iOS应用的URL,具体取决于它们使用的API 内部.

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.