danreeves / dt-exchange

40 stars 17 forks source link

Workaround for Chrome textarea. Fixes #41 #42

Closed errnoh closed 1 year ago

errnoh commented 1 year ago

41 mentions a bug where pageup and pagedown breaks the whole page layout. This seems to be 6 year old known bug in Chrome, discussed on this SO topic: https://stackoverflow.com/questions/17808854/pressing-pageup-while-in-textarea-moves-website-out-of-the-window

This commit implements the workaround mentioned as a solution. Firefox continues to work normally, on Chrome it prevents the page breaking issue but also doesn't scroll the textbox (does move the cursor position though).

If anyone has good ideas how to fix this in a way that still allows pageup and pagedown to work feel free to implement a better fix.