Custom Scroll Bar Logic

So I’ve done all that and updated the demo, seems to work pretty nicely:

https://mystifying-gates-6761c1.netlify.app/

I made use of Html.Lazy and Html.Keyed and I could see that made a small but barely discernable difference in performance.

The only other thing I would like to do is to override the arrow key and page up/down events, so that they always scroll by an exact integer number of lines. When going down, the last visible line of text should appear whole at the bottom, when going up the first visible line should appear whole at the top.

Plan is to use this for a code editor along these lines: Text editor done in pure Elm.

1 Like