COMP3122-2324-Project / Simpsyber

0 stars 0 forks source link

[DEFECT] Pressing enter after clicking the objectives(target) icon prints duplicate lines of messages. #4

Open 21027485D opened 9 months ago

21027485D commented 9 months ago

When the objectives icon is pressed, a popup appears showing the current objective. Pressing enter in this state causes multiple lines of the same message to be printed out. The expected behavior after pressing enter should be doing nothing or closing the objectives popup.

This bug has been tested and can be reproduced on the following browsers on default settings: Chrome 121.0.6167.161 (Official build) (64-bit) Edge 121.0.2277.106 (Official build) (64-bit) Firefox 122.0.1 (64-bit)

To reproduce the bug: Press start > Login > Close the first 3 messages > Click on target icon(bottom right) > Hit enter

Enter key bug

https://github.com/COMP3122-2324-Project/Simpsyber/assets/158080828/fdb0d0b4-68f8-4183-a56a-a5f8d9340b6f

louislab commented 9 months ago

Similar issues were found in HOME page too. When user click any of the "i" icon and hit enter multiple times, the popup dialog will be called multiple times and being stacked together. As @21027485D described, the expected behavior after pressing enter should be doing nothing or closing the popup.

https://github.com/COMP3122-2324-Project/Simpsyber/assets/80302893/63c73edb-7702-49c6-bd2d-619f22474363

Hky224 commented 8 months ago

i noticed that pressing the space bar in the objectives popup state also triggers the same issue. I believe this finding could be helpful in resolving the issue. The event handlers may need to modify to ensure that pressing the enter or space bar while the objectives popup is open will have no action or close the dialog.