Fix 'scroll on click' in rich text TOC and comments

pull/1/head
yflory 4 years ago
parent 88926fec10
commit 4ef26910c5

@ -578,7 +578,7 @@ define([
// Scroll into view // Scroll into view
if (!$last.length) { return; } if (!$last.length) { return; }
var visible = UIElements.isVisible($last[0], Env.$inner); var visible = UIElements.isVisible($last[0], Env.$contentContainer);
if (!visible) { $last[0].scrollIntoView(); } if (!visible) { $last[0].scrollIntoView(); }
}; };

@ -908,7 +908,7 @@ define([
$(a).click(function (e) { $(a).click(function (e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
if (!obj.el || UIElements.isVisible(obj.el, $inner)) { return; } if (!obj.el || UIElements.isVisible(obj.el, $contentContainer)) { return; }
obj.el.scrollIntoView(); obj.el.scrollIntoView();
}); });
a.innerHTML = title; a.innerHTML = title;

Loading…
Cancel
Save