Unexpected scroll position jump happens when there is text larger than normal
Version info
Firebase: 7.6.1
Firepad: 1.5.3
CodeMirror: 5.50.2
Other (e.g. Node, browser, operating system) (if applicable): Chrome 79.0.3945.88 Firefox 71.0
Test case
https://jsfiddle.net/ktsn/srt96dhc/14/
Steps to reproduce
- Make sure to change your browser height to let scrollbar appears.
- Scroll to the bottom
- Type something
- Scroll position will be changed
Expected behavior
Scroll position should not be changed.
Actual behavior
Scroll position is changed to upper.
This seems to happen because Firepad clears text style when modification occurs, which pushing scroll position up as scroll height is smaller. The position will not be fixed even after text style are reverted.
maybe can change height to 99% https://jsfiddle.net/avrahamz/eya4wb3g/1/
Unfortunately, it does not change the behavior. The position jump still happens.
I forgot mentioning what I investigated about this behavior. Edited my original post.