abbysmal / reason-web-toplevel

A Reason web toplevel built using js_of_ocaml
Other
17 stars 2 forks source link

Flashing when shift-enter. #2

Open jordwalke opened 8 years ago

jordwalke commented 8 years ago

For multiline mode, when hitting Shift+Enter, I notice that there is a white flash to the right of the line. This might have been because of moving the share button. I can take a look and fix this since it's probably just css/style related, but if know what's going on, it would help me fix it more quickly.

jordwalke commented 8 years ago

Oh, this appears to only be when an external keyboard is plugged in. It flashes the rendering of the scroll bars momentarily. I'll find a fix.

jordwalke commented 8 years ago

For now, putting these css rules will improve things: (for element #userinput).

https://blogs.msdn.microsoft.com/kurlak/2013/11/03/hiding-vertical-scrollbars-with-pure-css-in-chrome-ie-6-firefox-opera-and-safari/

But even with those, the flash of white scroll bar doesn't happen, but the text flashes subtly. After those CSS rules are applied, the remaining flash is much lower priority, but the solution I see is to always keep the text box height one row higher than necessary. currently, if you've typed two lines, it's exactly two lines high. Only when pressing enter does the box grow to be three lines tall. Instead, we should have the box be three lines tall when there is only two lines of text in it.