]> source.dussan.org Git - nextcloud-server.git/commitdiff
Prevent closing the create dropdown when right clicking in Firefox
authorVincent Petry <pvince81@owncloud.com>
Wed, 30 Oct 2013 16:55:41 +0000 (17:55 +0100)
committerVincent Petry <pvince81@owncloud.com>
Wed, 30 Oct 2013 16:55:41 +0000 (17:55 +0100)
Firefox sends a click event on the document when right clicking which
makes pasting with right click into the field impossible.

Fixes #5498

apps/files/js/file-upload.js

index 95c0723f254d115556c9e0c0ccf193f75a28682d..8c56f1cb364ea224fdcaa3e0f7f82b594093da34 100644 (file)
@@ -465,7 +465,11 @@ $(document).ready(function() {
                crumb.text(text);
        }
 
-       $(document).click(function() {
+       $(document).click(function(ev) {
+               // do not close when clicking in the dropdown
+               if ($(ev.target).closest('#new').length){
+                       return;
+               }
                $('#new>ul').hide();
                $('#new').removeClass('active');
                if ($('#new .error').length > 0) {