firepad icon indicating copy to clipboard operation
firepad copied to clipboard

Unexpected scroll position jump happens when there is text larger than normal

Open ktsn opened this issue 6 years ago • 3 comments

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

  1. Make sure to change your browser height to let scrollbar appears.
  2. Scroll to the bottom
  3. Type something
  4. 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.

ktsn avatar Jan 07 '20 03:01 ktsn

maybe can change height to 99% https://jsfiddle.net/avrahamz/eya4wb3g/1/

avrahamzvv avatar Jan 07 '20 08:01 avrahamzvv

Unfortunately, it does not change the behavior. The position jump still happens.

ktsn avatar Jan 07 '20 08:01 ktsn

I forgot mentioning what I investigated about this behavior. Edited my original post.

ktsn avatar Jan 08 '20 04:01 ktsn