domtronn / nuzlocke.app

Nuzlocke Tracker - For all Pokémon games and Rom Hacks to record, track, advise on encounters, and provide boss battles & level caps
https://nuzlocke.app
BSD 3-Clause "New" or "Revised" License
107 stars 17 forks source link

Creating a new location copies the name in the text box each time you perform a keyboard action on the text box #171

Open Novocastrian opened 6 months ago

Novocastrian commented 6 months ago

Describe the bug As the title says, the text box seems to inject the text box name whenever you do a keyboard action that isn't entering a character, such as Delete and Return keys doing their intended action then duplicating the text box contents

To Reproduce Steps to reproduce the behaviour:

  1. Start a new Blaze Black 2 Redux nuzlocke
  2. Click the next to any location (e.g. next to Floccesy Ranch)
  3. Click Add Location
  4. Enter a new name for the location
  5. Hit the Return key on the keyboard a few times
  6. Place the cursor anywhere in the generated text and click, then hit the Delete key a few times Expected behaviour Return submits the name and changes the focus to the next element for keyboard/screenreader users. Delete deletes the character, and the focus remains inside the textbox.

Actual Behaviour Return adds a new line then duplicates the entire textbox text. Delete deletes the character then duplicates the entire textbox text.

Screenshots https://github.com/domtronn/nuzlocke.app/assets/4601813/245e4b9d-e7c9-4205-9484-525709ec1360

Desktop (please complete the following information):