Remove input scroll from position (#13569)
* Remove input scroll from position * Rerun travis
This commit is contained in:
parent
fa38e4bf82
commit
59c7e25e22
1 changed files with 2 additions and 2 deletions
|
|
@ -17,8 +17,8 @@ export const getCursorXY = (input, selectionPoint) => {
|
|||
const bodyRect = document.body.getBoundingClientRect();
|
||||
const elementRect = input.getBoundingClientRect();
|
||||
|
||||
const inputY = elementRect.top - bodyRect.top;
|
||||
const inputX = elementRect.left - bodyRect.left;
|
||||
const inputY = elementRect.top - bodyRect.top - input.scrollTop;
|
||||
const inputX = elementRect.left - bodyRect.left - input.scrollLeft;
|
||||
|
||||
// create a dummy element with the computed style of the input
|
||||
const div = document.createElement('div');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue