AvaloniaEdit icon indicating copy to clipboard operation
AvaloniaEdit copied to clipboard

AvaloniaEdit works incorrectly with every value of AllowScrollBelowDocument

Open Takoooooo opened this issue 3 years ago • 4 comments

How it works in Avalonia with the default value(true). http://g.recordit.co/WMkRcE7Fxf.gif

How it works in WPF with value = true. http://g.recordit.co/6h5W3Ea404.gif

How it works in Avalonia with value = false. http://g.recordit.co/9KJGzvPYy9.gif

Fixed by #139 . Fixed behaviour https://recordit.co/8q2rA25T9I

How it works in WPF with value = false. http://g.recordit.co/3SBqf65cD5.gif

Takoooooo avatar Jul 16 '21 14:07 Takoooooo

Ok I somewhy can't repro anymore the behaviour in WPF with value = true from above. Current behaviour https://recordit.co/DdFcAp3QS2 which matches well with our behaviour in Avalonia

Takoooooo avatar Jul 19 '21 11:07 Takoooooo

Ok I somewhy can't repro anymore the behaviour in WPF with value = true from above. Current behaviour https://recordit.co/DdFcAp3QS2 which matches well with our behaviour in Avalonia

It's reproducible only when you scroll with your mouse, not scrollbar.I'm not sure we need to port this also. That behaviour is bad IMO

Takoooooo avatar Jul 19 '21 11:07 Takoooooo

Ok I somewhy can't repro anymore the behaviour in WPF with value = true from above. Current behaviour https://recordit.co/DdFcAp3QS2 which matches well with our behaviour in Avalonia

It's reproducible only when you scroll with your mouse, not scrollbar.I'm not sure we need to port this also. That behaviour is bad IMO

So current plan is to port the behaviour from WPF and additionally to make it consistent between scrollbar and mouse scrolling

Takoooooo avatar Jul 21 '21 08:07 Takoooooo

@Takoooooo, agree.

Note that other editors (VSCode, Sublime), behaves in that way. They allow scrolling below document by default, and they behave in this way:

  • When using Mouse/Scrollbar, the editor allows to display extra space, so the last document line in displayed the first viewport position.
  • When using the arrow keys (or Ctrl+END), the last line is placed in the last viewport line (no extra space is displayed in this case).

Demo: https://www.loom.com/share/aa99e5381fe34efbb2d22d4caa673c74

danipen avatar Jul 29 '21 14:07 danipen