erkyrath / lectrote

The IF interpreter in an Electron shell
Other
250 stars 28 forks source link

On autorestore, the window isn't scrolled all the way down #57

Closed erkyrath closed 7 years ago

erkyrath commented 8 years ago

I think the margins or font gets set after glkote's "scroll to bottom" event. Maybe change how the window launches its code.

erkyrath commented 8 years ago

After a lot of debugging, I don't know what's going on here.

On the call to window_scroll_to_bottom (after autorestore), frameel.get(0).scrollHeight has a value. Sometime after glk_update finishes, but before the next glk event, frameel.get(0).scrollHeight gets larger (14 pixels larger in my test). I have not dug out the cause.

It's not the font, font size, or margins being set. It's not the DOM style metrics still being computed. It's not the invisible cursel or input field being added.

curiousdannii commented 7 years ago

Is this fixed with the latest changes?

erkyrath commented 7 years ago

Oh, good question.

(Quick check...)

Yep!