jhuopensource / semesterly

Your Semester Made Easier | Course Scheduling & Social Tools for Students
https://semester.ly
GNU General Public License v3.0
33 stars 56 forks source link

Hitting backspace while searching may accidentally delete courses hovered in sidebar #1069

Closed spencerckhuang closed 8 months ago

spencerckhuang commented 8 months ago

Describe the Bug

Up/down arrow keys are currently able to be used to hover courses on the sidebar, and when a course is hovered, user can hit backspace to remove it from their timetable. However, if a course is hovered, and a user hits the backspace key while searching for another course, it will delete the course.

How can we reproduce the problem?

Steps to reproduce the behavior:

  1. Add a course to timetable
  2. Hover over it using the down arrow key
  3. Search for a course, and hit backspace (e.g. as if you made a typo)
  4. Hovered course should delete

Expected Behavior

When searching for a course, hitting backspace should not delete the hovered course in the sidebar. (Maybe if a course is being hovered, but a user goes to search for a course, the "hovered course index" reverts to -1)

OS Version

Windows

Which browsers are you seeing the problem on?

Chrome

Additional Information

No response

Code of Conduct