diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-04-09 19:53:43 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-04-09 19:53:43 +0200 |
commit | 10ffa3b770f4118133cfd79cca517835cde0ac73 (patch) | |
tree | e6003b432831e3213d72197ca5934d18bdf1cad7 /core/js | |
parent | 0bad8f644af1ca5b287d391cb7efdb392901b632 (diff) | |
parent | 51e4633187919057525b5cc64cb49f1cd439c7a0 (diff) | |
download | nextcloud-server-10ffa3b770f4118133cfd79cca517835cde0ac73.tar.gz nextcloud-server-10ffa3b770f4118133cfd79cca517835cde0ac73.zip |
Merge pull request #15512 from owncloud/autoclose-settings-menu
Don't stop event execution for menu item click
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/js.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/js/js.js b/core/js/js.js index 274eddffff7..cb93e73f2e0 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -476,11 +476,14 @@ var OC={ registerMenu: function($toggle, $menuEl) { $menuEl.addClass('menu'); $toggle.on('click.menu', function(event) { + // prevent the link event (append anchor to URL) + event.preventDefault(); + if ($menuEl.is(OC._currentMenu)) { $menuEl.slideUp(OC.menuSpeed); OC._currentMenu = null; OC._currentMenuToggle = null; - return false; + return; } // another menu was open? else if (OC._currentMenu) { @@ -490,7 +493,6 @@ var OC={ $menuEl.slideToggle(OC.menuSpeed); OC._currentMenu = $menuEl; OC._currentMenuToggle = $toggle; - return false; }); }, |