diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-10-07 13:11:34 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-10-07 13:11:34 +0200 |
commit | 27579f36f672181f0927e4f8bb1c4fd04345c28b (patch) | |
tree | cac4b58543e6598d2204f92b87b9f37994ba2b9c /core/js/share.js | |
parent | 46fdb449a4eb87fe7ab2b0c2c96b61f52c37a150 (diff) | |
download | nextcloud-server-27579f36f672181f0927e4f8bb1c4fd04345c28b.tar.gz nextcloud-server-27579f36f672181f0927e4f8bb1c4fd04345c28b.zip |
Prevent scroll up when click on links in sharing dropdown
When clicking on a link that points to "#" in the sharing dropdown, and
the current view is scrolled down, the browser will scroll the page up
to the top (anchor behavior).
This fix cancels the click event when clicking on "unshare" link or
"show crud" link.
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/js/share.js b/core/js/share.js index 8d14520cd74..bbdc5a67e9d 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -502,6 +502,7 @@ $(document).ready(function() { $(document).on('click', '#dropdown .showCruds', function() { $(this).parent().find('.cruds').toggle(); + return false; }); $(document).on('click', '#dropdown .unshare', function() { @@ -519,6 +520,7 @@ $(document).ready(function() { $('#expiration').hide(); } }); + return false; }); $(document).on('change', '#dropdown .permissions', function() { |