c6ed77a0fc
no issue When calculating if the editor should scroll to keep the cursor on screen upon selection change the editor would appear to scroll to random locations. The issue stemmed from the fact that the getPositionFromRange method took into account the scroll offset when figuring out the pixel position of a range. So, if the editor was vertically scrolled the scrollTop was added to the cursor position which the editor would assume meant that the cursor was offscreen when it wasn't. This fix creates a new method getPositionOnScreenFromRange which finds the position of an element on screen and ignores the scroll offset. |
||
---|---|---|
ghost/admin |