vendor/assets/javascripts/responsive-nav.js in responsive-nav-rails-1.0.24 vs vendor/assets/javascripts/responsive-nav.js in responsive-nav-rails-1.0.25

- old
+ new

@@ -1,6 +1,6 @@ -/*! responsive-nav.js 1.0.24 +/*! responsive-nav.js 1.0.25 * https://github.com/viljamis/responsive-nav.js * http://responsive-nav.com * * Copyright (c) 2013 @viljamis * Available under the MIT license @@ -360,10 +360,11 @@ } }, _onTouchStart: function (e) { e.stopPropagation(); + addClass(nav, "disable-pointer-events"); this.startX = e.touches[0].clientX; this.startY = e.touches[0].clientY; this.touchHasMoved = false; removeEvent(navToggle, "mouseup", this, false); }, @@ -378,16 +379,13 @@ _onTouchEnd: function (e) { this._preventDefault(e); if (!this.touchHasMoved) { if (e.type === "touchend") { this.toggle(e); - // Prevent click on the underlying menu on Android 2.3 - var that = this; - nav.addEventListener("click", that._preventDefault, true); setTimeout(function () { - nav.removeEventListener("click", that._preventDefault, true); - }, opts.transition + 100); + removeClass(nav, "disable-pointer-events"); + }, opts.transition + 300); return; } else { var evt = e || window.event; // If it isn't a right click if (!(evt.which === 3 || evt.button === 2)) { @@ -419,10 +417,10 @@ _calcHeight: function () { var savedHeight = 0; for (var i = 0; i < nav.inner.length; i++) { savedHeight += nav.inner[i].offsetHeight; } - var innerStyles = "." + opts.navClass + ".opened{max-height:" + savedHeight + "px}"; + var innerStyles = "." + opts.navClass + ".opened{max-height:" + savedHeight + "px !important}"; if (styleElement.styleSheet) { styleElement.styleSheet.cssText = innerStyles; } else { styleElement.innerHTML = innerStyles; \ No newline at end of file