[SSE] Header/footer: fix scrolling in editors

This commit is contained in:
Julia Radzhabova 2019-03-22 17:49:29 +03:00
parent 37ebd623b3
commit f4e174ac90

View file

@ -743,7 +743,9 @@ define([
var id = this.currentCanvas; var id = this.currentCanvas;
if (this.scrollers[id]) { if (this.scrollers[id]) {
var top = this.scrollers[id].getScrollTop(); var top = this.scrollers[id].getScrollTop();
if (pos + height>top+this.canvasBoxHeight || pos<top) if (pos + height>top+this.canvasBoxHeight)
this.scrollers[id].scrollTop(pos + height - this.canvasBoxHeight);
else if (pos<top)
this.scrollers[id].scrollTop(pos); this.scrollers[id].scrollTop(pos);
} }
}, },