فهرست منبع

HUE-2409 [fb] Context menu not displayed in Firefox

Stopped event bubbling in showContextMenu to allow display of context menu
Paul McCaughtry 11 سال پیش
والد
کامیت
f18e382
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      apps/filebrowser/src/filebrowser/templates/listdir_components.mako

+ 3 - 1
apps/filebrowser/src/filebrowser/templates/listdir_components.mako

@@ -647,13 +647,15 @@ from django.utils.translation import ugettext as _
             actions = $('#ch-dropdown'),
             rect = document.querySelector('body').getBoundingClientRect();
 
+          e.stopPropagation();
+
           // close the actions menu from button area if open
           if (actions.hasClass('open')) {
             actions.removeClass('open');
           }
 
           // display context menu and ensure it is on-screen
-          if ($.inArray(row.name, ['..', '.']) === -1) {
+          if ($.inArray(row.name, ['..', '.', '.Trash']) === -1) {
             this.selected(true);
             cm.css({ display: 'block', top: e.pageY - 15, left: (e.pageX < rect.right - 200 ) ? e.pageX : e.pageX - 250 });
           } else {