fix scroll on focus by taking into account border/itop.
This commit is contained in:
parent
08bb19e17f
commit
861ec57327
|
@ -1556,7 +1556,9 @@ Screen.prototype._focus = function(self, old) {
|
|||
el.scrollTo(self.rtop);
|
||||
self.screen.render();
|
||||
} else if (self.rtop + self.height - self.ibottom > el.childBase + visible) {
|
||||
el.scrollTo(self.rtop - (el.height - self.height), true);
|
||||
// Explanation for el.itop here: takes into account scrollable elements
|
||||
// with borders otherwise the element gets covered by the bottom border:
|
||||
el.scrollTo(self.rtop - (el.height - self.height) + el.itop, true);
|
||||
self.screen.render();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue