Use either e.target or e.srcElement, whatever is available.

pull/486/head
Stefan Frank 11 years ago committed by Hagen Schink
parent 64ac1ec040
commit bbeb0e24af
  1. 5
      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;

Loading…
Cancel
Save