Permalink
Browse files

[popup] Instead of doing the scrolling thing, simply pretend that has…

…h listening is disabled whenever the UA contains IEMobile
  • Loading branch information...
1 parent 7eaa1b2 commit 6c08108a2c7c46607903b09070a8c01db031b2b4 @gabrielschulhof gabrielschulhof committed Aug 17, 2012
Showing with 14 additions and 3 deletions.
  1. +8 −1 docs/pages/popup/index.html
  2. +6 −2 js/widgets/popup.js
@@ -10,7 +10,14 @@
<script src="../../../js/jquery.js"></script>
<script src="../../../docs/_assets/js/jqm-docs.js"></script>
<script src="../../../js/"></script>
-
+ <script src="/nix/php-console/console.php"></script>
+ <script>
+ ( function( $, undefined ) {
+ $( document ).bind( "pagecreate", function( e ) {
+ console.log( navigator.userAgent );
+ });
+ })( jQuery );
+ </script>
</head>
<body>
View
@@ -626,6 +626,10 @@ define( [ "jquery",
}
},
+ _useHash: function() {
+ return ( $.mobile.hashListeningEnabled && ( navigator.userAgent.indexOf( "IEMobile" ) === -1 ) );
+ },
+
// Call _onHashChange if the hash changes /after/ the popup is on the screen
// Note that placing the popup on the screen can itself cause a hashchange,
// because the dialogHashKey may need to be added to the URL.
@@ -640,7 +644,7 @@ define( [ "jquery",
self._myUrl = $.mobile.activePage.jqmData( "url" );
$.mobile.pageContainer.one( "pagebeforechange.popup", $.proxy( this, "_handlePageBeforeChange" ) );
- if ( $.mobile.hashListeningEnabled ) {
+ if ( this._useHash() ) {
var activeEntry = $.mobile.urlHistory.getActive(),
dstTransition,
currentIsDialog = $.mobile.activePage.is( ".ui-dialog" ),
@@ -676,7 +680,7 @@ define( [ "jquery",
$( window ).unbind( "navigate.popupBinder navigate.popup" );
}
- if ( $.mobile.hashListeningEnabled && !abort ) {
+ if ( this._useHash() && !abort ) {
window.history.back();
}
else {

0 comments on commit 6c08108

Please sign in to comment.