Browse Source

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

Stopped event bubbling in showContextMenu to allow display of context menu
Paul McCaughtry 11 years ago
parent
commit
f18e382

+ 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 {