1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Mobile: Fixes #2141: Fixed links not working within TOC

This commit is contained in:
Laurent Cozic
2020-02-14 00:36:11 +00:00
parent f97bae0b27
commit 675ef8aefd
2 changed files with 8 additions and 114 deletions

View File

@ -30,7 +30,7 @@ webviewLib.handleInternalLink = function(event, anchorNode) {
if (href.indexOf('#') === 0) {
event.preventDefault();
let old_hash = location.hash;
// let old_hash = location.hash;
location.hash = href;
@ -41,9 +41,13 @@ webviewLib.handleInternalLink = function(event, anchorNode) {
// position, the scroll positions stays correct though
// Additionally an anchor could not be clicked twice because the location
// would not change, this fixes that also
setTimeout(function() {
location.hash = old_hash;
}, 10);
//
// Commented out to fix https://github.com/laurent22/joplin/issues/2141
// We might need to fix a better fix to the previous bug.
//
// setTimeout(function() {
// location.hash = old_hash;
// }, 10);
return true;
}