From 9d2cbc60a5df44ba3fa481f5bf1412c20ad4cbc8 Mon Sep 17 00:00:00 2001 From: thomasb Date: Sun, 25 Jul 2010 20:39:10 +0000 Subject: Surround attachment form cleaning with try/catch git-svn-id: https://svn.roundcube.net/trunk@3825 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/skins/default/functions.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/roundcubemail/skins/default/functions.js b/roundcubemail/skins/default/functions.js index 47eb1fc4e..b39324ef9 100644 --- a/roundcubemail/skins/default/functions.js +++ b/roundcubemail/skins/default/functions.js @@ -88,8 +88,12 @@ uploadmenu: function(show) { if (typeof show == 'object') // called as event handler show = false; - if (!show) - $('#attachment-form input[type=file]').val(''); + + // clear upload form + if (!show) { + try { $('#attachment-form form')[0].reset(); } + catch(e){} // ignore errors + } this.show_popupmenu('uploadmenu', show); -- cgit v1.2.3