Skip to content
Browse files

Fixed getting the right path for Android which doesn't update window.…

…pathname after pushstate
  • Loading branch information...
1 parent 8103c84 commit 6fb03f936b5ca1d7543edc0c631291f79e4114eb Marc Grabanski committed
Showing with 6 additions and 1 deletion.
  1. +6 −1 jquery.mobile.routerlite.js
View
7 jquery.mobile.routerlite.js
@@ -23,7 +23,12 @@ $.mobile.routerlite = {
_initroutes: [],
_changeroutes: [],
_getPath: function() {
- return window.location.pathname;
+
+ var path = ($.mobile.urlHistory.getActive() && $.mobile.urlHistory.getActive().pageUrl) ?
+ $.mobile.urlHistory.getActive().pageUrl:
+ window.location.pathname;
+
+ return path;
},
_trigger: function(callback, uiPage) {
callback(uiPage, this._getPath());

0 comments on commit 6fb03f9

Please sign in to comment.
Something went wrong with that request. Please try again.