admin管理员组文章数量:1332403
Has the latest chrome version "43.0.2357.65 m" broken JQueryMobile 1.3.2 for anyone else? When I click a popup now it goes to the top of the page and the scroll bar dissapears. It was fine in previous version.
The problem is affecting my applicaiton but is reproduceable on the JQueryMobile demo pages:
- Using Chrome 43.0.2357.65 m go to .3.2/
- Click on popup
- On the popup page click on "Sign in" button halfway down the page.
- It will go to the top of the page and the scrollbar will have disappeared.
Note this doesn't happen every time - if you try it again it might work, but if you start the steps from a fresh tab it does appear to happen consistently.
I've raised an issue with Chrome but just wondering if anyone knows what's happening and if there's a workaround I can implement.
Thanks!
Has the latest chrome version "43.0.2357.65 m" broken JQueryMobile 1.3.2 for anyone else? When I click a popup now it goes to the top of the page and the scroll bar dissapears. It was fine in previous version.
The problem is affecting my applicaiton but is reproduceable on the JQueryMobile demo pages:
- Using Chrome 43.0.2357.65 m go to http://demos.jquerymobile./1.3.2/
- Click on popup
- On the popup page click on "Sign in" button halfway down the page.
- It will go to the top of the page and the scrollbar will have disappeared.
Note this doesn't happen every time - if you try it again it might work, but if you start the steps from a fresh tab it does appear to happen consistently.
I've raised an issue with Chrome but just wondering if anyone knows what's happening and if there's a workaround I can implement.
Thanks!
Share Improve this question asked May 25, 2015 at 13:35 icewhiteicewhite 4173 silver badges15 bronze badges 2- I am also seeing issues in an old app with 1.2.0, specifically around page transitions. – Lee Commented May 26, 2015 at 11:17
- I'm also seeing page transition issues in an old app with 1.2.x - no errors in the console but the whole page goes white after the transition. We removed it as a workaround. – embee Commented May 27, 2015 at 15:58
2 Answers
Reset to default 10The popup seems to be odd it's hard to replicate - Going to the exact link below and then clicking on the said "sign in" button seems to guarantee the behaviour. http://demos.jquerymobile./1.3.2/widgets/popup/#&ui-state=dialog
I believe the solution below may be related it fixes other fun issues with the slide transition. (only limited test with popup) but looks promising
Overriding the offending function with code snippet below. You have to call this before you load jquerymobile js
// Override of $.fn.animationComplete muse be called before initialise jquery mobile js
$(document).bind('mobileinit', function() {
$.fn.animationComplete = function(callback) {
if ($.support.cssTransitions) {
var superfy= "WebKitTransitionEvent" in window ? "webkitAnimationEnd" : "animationend";
return $(this).one(superfy, callback);
} else {
setTimeout(callback, 0);
return $(this);
}
};
})
Background: jqueryMobile 1.3.2 implements the jquery one() event handler attachment somewhat incorrectly.
.one() - "Attach a handler to an event for the elements. The handler is executed at most once per element per event type." : http://api.jquery./category/events/ : essentially event fires and then is removed.
However calling both ("webkitAnimationEnd and animationend") using one() would potentially mean that only 1 (depending on browser) of the two handlers is ever fired leaving the other too linger and potentially cause memory leaks.
Chrome43 handles both webkitAniationEnd and animationend - however only one at any given time. This leaves the other to linger and fire off the next time animation on the element occurs.
As a workaround for me, it seems to work if you use the jQueryMobile API.
$('selector').popup('open');
instead of relying on the jQueryMobile markup
My Chrome Version is "43.0.2357.81 m" and I am experiencing this too
本文标签: javascriptPopups fail in JQueryMobile 132 after update chrome version 430235765 mStack Overflow
版权声明:本文标题:javascript - Popups fail in JQueryMobile 1.3.2 after update chrome version 43.0.2357.65 m - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742277361a2445446.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论