4 ms·
Why wouldn't the <enter> key interrupt or freeze the keypress queue? I don't think you need some advanced async logic to get this right. The only potential dow
by ballenf 6y ago
Why wouldn't the <enter> key interrupt or freeze the keypress queue? I don't think you need some advanced async logic to get this right.
The only potential downside would be if people expected to be able to cancel the <enter> action. But that would be unusual, I think.
- ivanbakel 6y agoAs a rule of thumb: if you ever ask "why not", and the alternative you're proposing is more complicated - that is normally why not. Lots of UI/UX bugs can simply be attributed to the programmer taking the most simple possible design. In this case, the async logic is not advanced. In fact, I'm willing to bet that this is what happened: at first, the file-opening was synchronous in the GUI. People complained that opening certain files locked up the file picker, so a developer sticks the file-opening code in a background thread. This produces the above bug, without complicating the input design - in fact, preventing the bug requires making additional changes to the code in some way.
- ballenf 6y agoThanks that makes total sense. And a good rule of thumb for me to remember.
- toast0 6y agoYou can't do work on the UI thread, it'll block the UI! With only half a /s