From b238ccaf275f710bf8a5fb31ef8da10c2cc8f853 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Tue, 15 Apr 2014 12:27:35 -0700 Subject: [PATCH] Fixed the context-menu preventer in the level editor. --- app/views/editor/level/thangs_tab_view.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/editor/level/thangs_tab_view.coffee b/app/views/editor/level/thangs_tab_view.coffee index 8a6c4cfe5..61434ae6f 100644 --- a/app/views/editor/level/thangs_tab_view.coffee +++ b/app/views/editor/level/thangs_tab_view.coffee @@ -179,6 +179,7 @@ module.exports = class ThangsTabView extends View destroy: -> @selectAddThangType null @surface.destroy() + $(document).bind 'contextmenu', @preventDefaultContextMenu super() onViewSwitched: (e) -> @@ -426,6 +427,7 @@ module.exports = class ThangsTabView extends View @$el.find('.thangs-column').show() preventDefaultContextMenu: (e) -> + return unless $(e.target).closest('#canvas-wrapper').length e.preventDefault() onSpriteContextMenu: (e) ->