From 2ac433b37584cfdc870f2659e49d2ee600dfaf9e Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 28 Feb 2013 17:26:02 +0100 Subject: [PATCH] Fix upload button --- plugins/kolab_files/skins/larry/ui.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/kolab_files/skins/larry/ui.js b/plugins/kolab_files/skins/larry/ui.js index 75199ce1..a0a3c494 100644 --- a/plugins/kolab_files/skins/larry/ui.js +++ b/plugins/kolab_files/skins/larry/ui.js @@ -103,7 +103,7 @@ function kolab_files_upload_input(button) file.attr({name: 'file[]', type: 'file', multiple: 'multiple', size: 5}) .change(function() { rcmail.files_upload('#filesuploadform'); }) // opacity:0 does the trick, display/visibility doesn't work - .css({opacity: 0, cursor: 'pointer', position: 'absolute'}); + .css({opacity: 0, cursor: 'pointer', position: 'absolute', top: '10000px', left: '10000px'}); // In FF we need to move the browser file-input's button under the cursor // Thanks to the size attribute above we know the length of the input field @@ -118,8 +118,9 @@ function kolab_files_upload_input(button) file.css({top: (e.pageY - offset.top - 10) + 'px', left: (e.pageX - offset.left - 10) + 'px'}); // move the input away if button is disabled else - file.css({top: '1000px', left: '1000px'}); + $(this).mouseleave(); }) + .mouseleave(function() { file.css({top: '10000px', left: '10000px'}); }) .attr('onclick', '') // remove default button action .append(file); };