xontab / chrome-virtual-keyboard

Touch-friendly Virtual Keyboard for Chrome browser
http://apps.xontab.com/VirtualKeyboard/
MIT License
58 stars 68 forks source link

edit scrollTop and scrollLeft #39

Closed jmbott closed 5 years ago

jmbott commented 5 years ago

I was experiencing #26, when the keyboard was exited the window would not return to the original position leaving white space at the bottom of the page.

I found I was getting zeros for document.body.scrollTop and found this question.

This replaces body with documentElement in the scroll checks. I don't know if it works everywhere but it seems to have fixed my problem for now. I believe it is only necessary to change here but I figured if its not working there it makes sense to change it across the board.