From 6d25943f2f060c9325ba7a54ca419e9394f3b982 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Thu, 11 Aug 2011 12:50:29 -0400 Subject: [PATCH] Fix some areas on dropdown triggering the dropdown to hide --- apps/files_sharing/js/share.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 686361d9aba..ce3e1193bc2 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -1,7 +1,7 @@ $(document).ready(function() { if (typeof FileActions !== 'undefined') { FileActions.register('all', 'Share', OC.imagePath('core', 'actions/share'), function(filename) { - if ($('#dropdown').length != 0) { + if (($('#dropdown').length)) { $('#dropdown').hide('blind', function() { var dropdownFile = $('#dropdown').data('file') var file = $('#dir').val()+'/'+filename; @@ -30,7 +30,7 @@ $(document).ready(function() { }); $(this).click(function(event) { - if ($(event.target).parents().index($('#dropdown')) == -1) { + if (!($(event.target).hasClass('drop')) && $(event.target).parents().index($('#dropdown')) == -1) { if ($('#dropdown').is(':visible')) { $('#dropdown').hide('blind', function() { $('#dropdown').remove(); @@ -136,7 +136,7 @@ $(document).ready(function() { }); function createDropdown(filename, files) { - var html = "