Open tobiasschweizer opened 5 years ago
src/app/directives/mathjax.directive.ts
:
if (this._bindEvents && targetElement.parentElement.nodeName.toLowerCase() === 'a'
&& targetElement.parentElement.className.toLowerCase().indexOf(KnoraConstants.RefMarker) >= 0) {
// internal reference in a BEBB letter: scroll to footnote on page
const indexOfHashtag = targetElement.parentElement.href.indexOf('#', '');
if (indexOfHashtag !== -1) {
const targetId = targetElement.parentElement.href.substr(indexOfHashtag + 1);
const targetEle = document.getElementById(targetId);
if (targetEle) {
targetEle.scrollIntoView();
}
}
// preventDefault (propagation)
return false;
Go to footnote: jumps to the wrong footnote.