Explorar el Código

Fixed ios double tap menu issue

Denis K hace 8 años
padre
commit
7adc754c3a
Se han modificado 1 ficheros con 13 adiciones y 0 borrados
  1. 13 0
      jet/static/jet/js/src/features/sidebar/popup.js

+ 13 - 0
jet/static/jet/js/src/features/sidebar/popup.js

@@ -184,6 +184,19 @@ SideBarPopup.prototype = {
             self.$currentSectionListItem = $(this).closest('.sidebar-popup-list-item');
             self.resetCurrentSectionListItems();
             self.$currentSectionListItem.addClass('selected');
+        }).on('touchmove touchend', function(e) {
+            var $el = $(this);
+
+            if (e.type == 'touchmove') {
+                $el.data('element_swiped', true);
+                return;
+            }
+
+            if (e.type == 'touchend' && !$el.data('element_swiped')) {
+                window.location = $el.attr('href');
+            }
+
+            $el.data('element_swiped', false);
         });
 
         this.initSectionKeyboardControls();