summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-07-25 20:39:10 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-07-25 20:39:10 +0000
commit9d2cbc60a5df44ba3fa481f5bf1412c20ad4cbc8 (patch)
tree1bb2346b3eb2dacba1ed9b42f809ffb1710cfb3b
parent9857348a6ae2ffd0be16c1bc488a31980a673c7d (diff)
Surround attachment form cleaning with try/catch
git-svn-id: https://svn.roundcube.net/trunk@3825 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/skins/default/functions.js8
1 files 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);