summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2010-07-25 20:39:10 +0000
committerthomascube <thomas@roundcube.net>2010-07-25 20:39:10 +0000
commit64fa955059a8dffe553c01a05115afed1c91e8f2 (patch)
treeb2a98319189b06c3720b4e5817f71941e0a3b6b0
parent52c0f7626c6bad1f27e0d5ff8199e4abdd427712 (diff)
Surround attachment form cleaning with try/catch
-rw-r--r--skins/default/functions.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/skins/default/functions.js b/skins/default/functions.js
index 47eb1fc4e..b39324ef9 100644
--- a/skins/default/functions.js
+++ b/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);