Down arrow at end of second to last line skips last line

So I did some investigation around this, and unfortunately, I think itā€™s an extremely difficult problem that weā€™ll probably not be able to solve. The problem lies in the rendering engine that is Chrome (as well as chromium, which powers our desktop app).

So the short version is that Chrome considers the end of the current line and the beginning of the next line to be the exact same place. It actually ā€˜prefersā€™ that location to be the beginning of the next line (if you press left and then right, or vice versa, youā€™ll see that the cursor is no longer at the end of that line but is now at the beginning of the next line).

So this works fine on every line thatā€™s not the second-to-last line because chrome internally remembers if it was at the end of the line or if it was beginning of next line, and if you press up or down, chrome can properly put the cursor at the end/beginning.

But it all breaks when you press down when the cursor is at the second-to-last line because Dynalist (js) thinks youā€™re at the beginning of the last line, and has to do something to allow you to jump to the next item (browsers doesnā€™t let you jump across items natively).