summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-04-09 19:53:43 +0200
committerVincent Petry <pvince81@owncloud.com>2015-04-09 19:53:43 +0200
commit10ffa3b770f4118133cfd79cca517835cde0ac73 (patch)
treee6003b432831e3213d72197ca5934d18bdf1cad7 /core/js
parent0bad8f644af1ca5b287d391cb7efdb392901b632 (diff)
parent51e4633187919057525b5cc64cb49f1cd439c7a0 (diff)
downloadnextcloud-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.js6
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;
});
},