jquery/jquery-mobile — Issue #3036: scroll event gets unbound when back button is clicked
Author: strada
Created: 2011-11-13 03:00:23+00:00
State: open

I'm not sure if this is a bug in jQuery (Mobile), or mobile safari's bfcache. I've made an example to illustrate the issue clearly:

[http://nevue.net/a.htm](http://nevue.net/a.htm)

The page has and event handler for scroll, and it works as expected in iOS. On the bottom of the page there is an external link, which also shows how many times the scroll event is fired. When you go to the external page and then return by clicking the back button, the event handler does not fire anymore. If I bind to jQuery Mobile scrollstart/scrollstop, these events keep firing after I return to the page with back button.

Prior to iOS 5, I could disable the bfcache by defining an empty onunload handler, but that is not working as of iOS 5.