mirror of https://github.com/status-im/codimd.git
Update to prevent all empty link change hash
This commit is contained in:
parent
3c0667813c
commit
e00daee6c0
|
@ -91,9 +91,12 @@ $(".masthead-nav li").click(function () {
|
|||
$(this).addClass("active");
|
||||
});
|
||||
|
||||
$(".ui-home").click(function (e) {
|
||||
// prevent empty link change hash
|
||||
$('a[href="#"]').click(function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
$(".ui-home").click(function (e) {
|
||||
if (!$("#home").is(':visible')) {
|
||||
$(".section:visible").hide();
|
||||
$("#home").fadeIn();
|
||||
|
@ -101,8 +104,6 @@ $(".ui-home").click(function (e) {
|
|||
});
|
||||
|
||||
$(".ui-history").click(function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (!$("#history").is(':visible')) {
|
||||
$(".section:visible").hide();
|
||||
$("#history").fadeIn();
|
||||
|
|
|
@ -1754,6 +1754,10 @@ ui.toolbar.uploadImage.bind('change', function (e) {
|
|||
ui.toc.dropdown.click(function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
// prevent empty link change hash
|
||||
$('a[href="#"]').click(function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
//modal actions
|
||||
var revisions = [];
|
||||
|
|
Loading…
Reference in New Issue