mirror of https://github.com/status-im/codimd.git
Fix published note won't scroll to hash on load
This commit is contained in:
parent
80ee507951
commit
64d1d2c04b
|
@ -18,6 +18,7 @@ var smoothHashScroll = extra.smoothHashScroll;
|
||||||
var postProcess = extra.postProcess;
|
var postProcess = extra.postProcess;
|
||||||
var updateLastChange = extra.updateLastChange;
|
var updateLastChange = extra.updateLastChange;
|
||||||
var parseMeta = extra.parseMeta;
|
var parseMeta = extra.parseMeta;
|
||||||
|
var scrollToHash = extra.scrollToHash;
|
||||||
var preventXSS = require('./render').preventXSS;
|
var preventXSS = require('./render').preventXSS;
|
||||||
|
|
||||||
var markdown = $("#doc.markdown-body");
|
var markdown = $("#doc.markdown-body");
|
||||||
|
@ -117,6 +118,7 @@ $(window).resize(function () {
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
windowResize();
|
windowResize();
|
||||||
generateScrollspy();
|
generateScrollspy();
|
||||||
|
setTimeout(scrollToHash, 0);
|
||||||
//tooltip
|
//tooltip
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue