Skip to content
Permalink
Browse files

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

  • Loading branch information
laurent22 committed Feb 14, 2020
1 parent f97bae0 commit 675ef8aefdcadd67ebb960bf37a46eb1e3a2b80c
Showing with 8 additions and 114 deletions.
  1. +0 −110 ReactNativeClient/lib/joplin-renderer/webviewLib.js
  2. +8 −4 ReactNativeClient/lib/renderers/webviewLib.js

This file was deleted.

@@ -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;
}

0 comments on commit 675ef8a

Please sign in to comment.
You can’t perform that action at this time.