summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);