Canceling the beforepagechange event during a data-rel="back" transition does not prevent hash change. #4005

Closed
deAtog opened this Issue Apr 11, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@deAtog

deAtog commented Apr 11, 2012

The stack when this occurs is as follows:

changePage(toPage=[div#home.ui-page], options=Object { changeHash=false, fromHashChange=true})jquery...rc.2.js (line 3239)
_handleHashChange(hash="")jquery...rc.2.js (line 3744)
(?)(e=Object { originalEvent=Event hashchange, type="hashchange", timeStamp=1334152474552000, more...}, triggered=undefined)jquery...rc.2.js (line 3750)
dispatch(event=Object { originalEvent=Event hashchange, type="hashchange", timeStamp=1334152474552000, more...})jquery-1.7.2.js (line 3332)
eventHandle(e=hashchange )jquery-1.7.2.js (line 2941)

Line 3239 in jquery.mobile.1.1.0-rc.2.js is the return from the changePage function if the pagebeforechange event has been canceled. As we can see from the stacktrace, changePage is being called as a result of a hash change. In other words, the user clicked a button with data-rel="back", the hash change occurred and was immediately followed by the call to the pagebeforechange event. If the pagebeforechange event is canceled, the hash must remain the same.

@deAtog

This comment has been minimized.

Show comment Hide comment
@deAtog

deAtog Apr 11, 2012

This is a duplicate of issue 3136. However, this issue remains unresolved in 1.1.0 rc2.

deAtog commented Apr 11, 2012

This is a duplicate of issue 3136. However, this issue remains unresolved in 1.1.0 rc2.

deAtog added a commit to deAtog/jquery-mobile that referenced this issue Apr 20, 2012

@deAtog deAtog referenced this issue Apr 23, 2012

Closed

4005 fix #4179

@johnbender

This comment has been minimized.

Show comment Hide comment
@johnbender

johnbender May 21, 2012

Contributor

@deAtog

Closing in favor of the original issue #3136. See my comments there for further conversation?

Contributor

johnbender commented May 21, 2012

@deAtog

Closing in favor of the original issue #3136. See my comments there for further conversation?

@johnbender johnbender closed this May 21, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment