From bbeb0e24afab3dd57061ed5d6d60ba53220926bb Mon Sep 17 00:00:00 2001 From: Stefan Frank Date: Thu, 10 Oct 2013 15:51:25 +0200 Subject: [PATCH] Use either e.target or e.srcElement, whatever is available. --- app/assets/javascripts/context_menu.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/context_menu.js b/app/assets/javascripts/context_menu.js index a6e7520d9c..f60aa1181a 100644 --- a/app/assets/javascripts/context_menu.js +++ b/app/assets/javascripts/context_menu.js @@ -140,11 +140,14 @@ ContextMenu.prototype = { $('context-menu').style['top'] = (render_y + 'px'); Element.update('context-menu', ''); + // some IE-versions only know the srcElement + var target = e.target ? e.target : e.srcElement; + new Ajax.Updater({success:'context-menu'}, this.url, {asynchronous:true, method: 'get', evalScripts:true, - parameters: jQuery(e.target).closest("form").serialize(), + parameters: jQuery(target).closest("form").serialize(), onComplete:function(request){ dims = $('context-menu').getDimensions(); menu_width = dims.width;