jquery/jquery-mobile — pull request #4378 by frequent (2012-05-17 09:47:04+00:00)
Title: Resetting ignoreNextHashChange without a timer in poppedState ~ follow up #3980 and #4094

Follow up to [3980-fix](https://github.com/jquery/jquery-mobile/commit/714266d60d5e9cd4c4e0cbec4b3ad7bf1152fe92#-P0) and [4094](https://github.com/jquery/jquery-mobile/issues/4094)

This should work without a 200ms timer, too (I'm having trouble with the 200ms and pagebeforechange)

ignoreNextHashChange is not set/reset very often. So consider this:

1) ignoreNextHashChange (= ignore) is initially set to FALSE.

2) On forward transitions it's set to ignore=TRUE inside changepage (line 3608, latest), so the trailing hashchange enters poppedState with ignore=TRUE, which is blocked in _handleHashChange and reset to ignore="FALSE". The if-clause here just "double-sets" to ignore=TRUE.

3a) On backwards transitions, _handleHashChange thus should always receive ignore=FALSE (either initially... can't be... or following a forward transition when ignore=FALSE was set from the blocked trailing hashchange of the previous forward/backward transition.

3b) Therefore simply firing _handleHashChange should pass ignore=FALSE, which lets this "first" iteration run through. The if-clause sets ignore=TRUE after firing _handleHashChange. The hashchange triggered from the changePage call in _handleHashChange will now enter popped state with ignore="TRUE" and will be blocked inside _handleHashChange and reset to "FALSE".

Makes sense and works in my mini-setup [test](http://www.franckreich.de/jqm/sample.html)