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

pull/1/head
yflory 4 years ago committed by ansuz
parent 45af7f703f
commit 1ef5e857d7

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