WebApp: With "Developer Tools" open, ENTER key works differently (Windows only)

Issue #123 resolved
Turgut Guneysu created an issue

When in "Developer Tools Page" display mode (needed to view console messages or errors etc), microBlocks editor data entry fields (White ones) behave different: After an entry, if one presses the ENTER key, instead of terminating the entry mode, one gets a NEW LINE entry in the field. The only way to terminate data entry is to click anywhere other than the data entry area.

Here is snapshot of an edited field after pressing ENTER 5 five times:

Comments (8)

  1. John Maloney repo owner

    I wasn’t able to reproduce this in Chrome 84.0.4147.135. My test was to type “hello” into the say block then hit enter. That terminated text entry and did not add a newline.

    However, I’m running Windows 10 in VMWare Fusion on a Mac so things might be different than a real Windows computer. Is it still happening to you in the latest version of Chrome? (I normally use a Windows computer at the local library to test Windows issues but the library is closed due to the pandemic.)

  2. Turgut Guneysu reporter

    ver0.6.9:

    Chrome: Version 85.0.4183.121 (Official Build) (64-bit)

    dropped the set var block onto code area:

    Switched to dev mode using SHIFT-CTRL-I.

    Typed 123 into the set var entry area and pressed ENTER:

    It duplicated the entered 123.

    then I pressed ENTER 5 more times and ended up with:

    Same thing with SAY test (duplicates):

    Here is setting pin 5 to 512 (duplicates):

    WAIT 1000 ms:

    etc.

    Let me know how I can help with debugging.

  3. John Maloney repo owner

    Thanks for the careful testing.

    I found an article that may explain why I couldn’t reproduce the issue by hitting the enter key on my Mac:

    https://creativepro.com/a-tale-of-two-enter-keys/

    And this article talks about how to detect the difference in Javascript:

    https://stackoverflow.com/questions/5418313/how-to-differentiate-between-enter-and-return-keys-in-javascript

    I should be able to figure out a solution based on all that info. Since I don’t have access to a real Windows computer right now I’ll need to rely on you to test it when I have a possible solution.

  4. John Maloney repo owner

    I just tested this on a real windows computer. As far as I can tell, it is fixed. Feel free to reopen if it is not working for you.

  5. Log in to comment