PhoneGap / Cordova scrollTo Ignored

徘徊边缘 提交于 2019-12-24 00:49:37

问题


I'm using Cordova 1.9.0 on iOS and loading an external site into the UIWebView container. Everything runs at it should however if you scroll down the page and click a link the next page loads at the same scroll position rather than at the top of the page.

I have been unable to force it to load the pages at the top so now I'm trying to use:

window.scrollTo( 0, 0 );

However this seems to be completely ignored when run in the simulator and on the phone whereas it works fine in Safari on the desktop.

Any help would be appreciated.

来源:https://stackoverflow.com/questions/11781054/phonegap-cordova-scrollto-ignored

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!