mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 03:15:56 +00:00
Headlines.move: maybe glitch less when moving back to top, etc
This commit is contained in:
@@ -33,6 +33,18 @@ define(["dojo/_base/declare"], function (declare) {
|
||||
|
||||
elem.scrollTop += offset;
|
||||
},
|
||||
isChildVisible: function(elem, ctr) {
|
||||
if (!elem) return;
|
||||
|
||||
const ctop = ctr.scrollTop;
|
||||
const cbottom = ctop + ctr.offsetHeight;
|
||||
|
||||
const etop = elem.offsetTop;
|
||||
const ebottom = etop + elem.offsetHeight;
|
||||
|
||||
return etop >= ctop && ebottom <= cbottom ||
|
||||
etop < ctop && ebottom > ctop || ebottom > cbottom && etop < cbottom;
|
||||
},
|
||||
},
|
||||
constructor: function() {
|
||||
window.onerror = this.Error.onWindowError;
|
||||
|
||||
Reference in New Issue
Block a user