From 2b79648a11a56cda10c4838df295ff0ea5da92fa Mon Sep 17 00:00:00 2001 From: jlukic Date: Thu, 22 Jan 2015 13:45:55 -0500 Subject: [PATCH] #1683, iOS and Mobile match return false on 2nd+ matches due to use of regexp test --- src/definitions/modules/sidebar.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/definitions/modules/sidebar.js b/src/definitions/modules/sidebar.js index bf0eefece..afef8f4bb 100644 --- a/src/definitions/modules/sidebar.js +++ b/src/definitions/modules/sidebar.js @@ -462,7 +462,7 @@ $.fn.sidebar = function(parameters) { if(settings.transition == 'scale down') { module.scrollToTop(); } - module.set.transition(); + module.set.transition(transition); module.repaint(); animate = function() { module.bind.clickaway(); @@ -505,7 +505,7 @@ $.fn.sidebar = function(parameters) { ; module.verbose('Removing context push state', module.get.direction()); - module.set.transition(); + module.set.transition(transition); module.unbind.clickaway(); module.unbind.scrollLock(); @@ -695,7 +695,7 @@ $.fn.sidebar = function(parameters) { direction = module.get.direction(), transition ; - return ( module.is.mobile() ) + transition = ( module.is.mobile() ) ? (settings.mobileTransition == 'auto') ? settings.defaultTransition.mobile[direction] : settings.mobileTransition @@ -703,6 +703,8 @@ $.fn.sidebar = function(parameters) { ? settings.defaultTransition.computer[direction] : settings.transition ; + module.verbose('Determined transition', transition); + return transition; }, transitionEvent: function() { var @@ -763,7 +765,7 @@ $.fn.sidebar = function(parameters) { ios: function() { var userAgent = navigator.userAgent, - isIOS = regExp.ios.test(userAgent) + isIOS = userAgent.match(regExp.ios) ; if(isIOS) { module.verbose('Browser was found to be iOS', userAgent); @@ -776,7 +778,7 @@ $.fn.sidebar = function(parameters) { mobile: function() { var userAgent = navigator.userAgent, - isMobile = regExp.mobile.test(userAgent) + isMobile = userAgent.match(regExp.mobile) ; if(isMobile) { module.verbose('Browser was found to be mobile', userAgent);