Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

tabs cause error if history.pushState has been called #8630

Open
pstanton opened this issue Jul 9, 2018 · 0 comments
Open

tabs cause error if history.pushState has been called #8630

pstanton opened this issue Jul 9, 2018 · 0 comments

Comments

@pstanton
Copy link

pstanton commented Jul 9, 2018

i have a tab component which i'm creating via $(container).trigger("create"); after I have previously used history.pushState to pretty up my page's address. When the tabs component within the container is creating itself, it seems to trigger an xhr request to the current page's url for some unknown reason. This in turn causes all of the scripts in the page to be "eval'd" which throws an error and breaks my whole page.

stack of unexpected xhr request:

send (jquery-2.2.4.js:9064)
ajax (jquery-2.2.4.js:8656)
load (jquery.mobile-1.4.5.js:15186)
(anonymous) (jquery.mobile-1.4.5.js:835)
_create (jquery.mobile-1.4.5.js:14493)
(anonymous) (jquery.mobile-1.4.5.js:835)
_createWidget (jquery.mobile-1.4.5.js:1000)
$.(anonymous function).(anonymous function) (jquery.mobile-1.4.5.js:796)
(anonymous) (jquery.mobile-1.4.5.js:947)
each (jquery-2.2.4.js:365)
each (jquery-2.2.4.js:137)
$.fn.(anonymous function) (jquery.mobile-1.4.5.js:942)
enhanceWithin (jquery.mobile-1.4.5.js:602)
(anonymous) (jquery.mobile-1.4.5.js:4417)
dispatch (jquery-2.2.4.js:4737)
elemData.handle (jquery-2.2.4.js:4549)
trigger (jquery-2.2.4.js:7807)
(anonymous) (jquery-2.2.4.js:7875)
each (jquery-2.2.4.js:365)
each (jquery-2.2.4.js:137)
trigger (jquery-2.2.4.js:7874)
show (landing.js?v=44:58) <-- my code

If I take out my call to history.pushState, or my tabs component it all works again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant