From 6968ba73c6887f0a5db55bb7620ce1fc70aa6374 Mon Sep 17 00:00:00 2001 From: Nathan Kinkade Date: Wed, 11 Mar 2009 23:57:08 +0000 Subject: Make sure that evt.target exists before trying to access it. --- roundcubemail/skins/npk/functions.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/roundcubemail/skins/npk/functions.js b/roundcubemail/skins/npk/functions.js index 5c77d9a85..8cd643b89 100644 --- a/roundcubemail/skins/npk/functions.js +++ b/roundcubemail/skins/npk/functions.js @@ -184,10 +184,13 @@ body_mouseup: function(evt, p) // It's a bit questionable to coopt the mouseup event for this // purpose, but it keeps the code inside the skin and seems to // work well enough for now. - if (evt.target.childNodes[0].nodeValue=="Spam") - toggle_hamnotspambutton('inline'); - else - toggle_hamnotspambutton('none'); + if (evt.target) + { + if (evt.target.childNodes[0].nodeValue=="Spam") + toggle_hamnotspambutton('inline'); + else + toggle_hamnotspambutton('none'); + } }, -- cgit v1.2.3