summaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-09 14:46:26 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-04-09 18:32:33 +0200
commit51e4633187919057525b5cc64cb49f1cd439c7a0 (patch)
tree211aa30ef1e7d597feae836979e61838da5d3bf6 /core/js/js.js
parentc840c182526b9f178d312bf8519a8179ad5e968c (diff)
downloadnextcloud-server-51e4633187919057525b5cc64cb49f1cd439c7a0.tar.gz
nextcloud-server-51e4633187919057525b5cc64cb49f1cd439c7a0.zip
Don't stop event execution for menu item click
* fixes #12326 - the settings menu is closed now, because the event is executed
Diffstat (limited to 'core/js/js.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;
});
},