Fixed adjust scroll
This commit is contained in:
parent
0a00931efd
commit
7cc1c4e8b7
@ -185,20 +185,20 @@ define([
|
|||||||
if(this.cursorY !== coordinates.y) {
|
if(this.cursorY !== coordinates.y) {
|
||||||
this.cursorY = coordinates.y;
|
this.cursorY = coordinates.y;
|
||||||
eventMgr.onCursorCoordinates(coordinates.x, coordinates.y);
|
eventMgr.onCursorCoordinates(coordinates.x, coordinates.y);
|
||||||
if(adjustScroll) {
|
}
|
||||||
var adjustTop, adjustBottom;
|
if(adjustScroll) {
|
||||||
adjustTop = adjustBottom = inputElt.offsetHeight / 2 * settings.cursorFocusRatio;
|
var adjustTop, adjustBottom;
|
||||||
adjustTop = this.adjustTop || adjustTop;
|
adjustTop = adjustBottom = inputElt.offsetHeight / 2 * settings.cursorFocusRatio;
|
||||||
adjustBottom = this.adjustBottom || adjustTop;
|
adjustTop = this.adjustTop || adjustTop;
|
||||||
if(adjustTop && adjustBottom) {
|
adjustBottom = this.adjustBottom || adjustTop;
|
||||||
var cursorMinY = inputElt.scrollTop + adjustTop;
|
if(adjustTop && adjustBottom) {
|
||||||
var cursorMaxY = inputElt.scrollTop + inputElt.offsetHeight - adjustBottom;
|
var cursorMinY = inputElt.scrollTop + adjustTop;
|
||||||
if(selectionMgr.cursorY < cursorMinY) {
|
var cursorMaxY = inputElt.scrollTop + inputElt.offsetHeight - adjustBottom;
|
||||||
inputElt.scrollTop += selectionMgr.cursorY - cursorMinY;
|
if(selectionMgr.cursorY < cursorMinY) {
|
||||||
}
|
inputElt.scrollTop += selectionMgr.cursorY - cursorMinY;
|
||||||
else if(selectionMgr.cursorY > cursorMaxY) {
|
}
|
||||||
inputElt.scrollTop += selectionMgr.cursorY - cursorMaxY;
|
else if(selectionMgr.cursorY > cursorMaxY) {
|
||||||
}
|
inputElt.scrollTop += selectionMgr.cursorY - cursorMaxY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user