Explorar o código

Fixed ios double tap menu issue

Denis K %!s(int64=8) %!d(string=hai) anos
pai
achega
7adc754c3a
Modificáronse 1 ficheiros con 13 adicións e 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();