Fixed Issue 102, screenToTextCoordinates returning incorrect row when window is scrolled in the Y direction
This commit is contained in:
parent
2f26407592
commit
e228eda37a
1 changed files with 1 additions and 1 deletions
|
|
@ -615,7 +615,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
var col = Math.round((pageX + this.scroller.scrollLeft - canvasPos.left - this.$padding)
|
||||
/ this.characterWidth);
|
||||
var row = Math.floor((pageY + this.scrollTop - canvasPos.top)
|
||||
var row = Math.floor((pageY + this.scrollTop - canvasPos.top - window.pageYOffset)
|
||||
/ this.lineHeight);
|
||||
|
||||
return this.session.screenToDocumentPosition(row, Math.max(col, 0));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue