Open
Description
Problem
When editing an edition, writing something in the ID Numbers field and pressing the return key causes the ID to be added. But when trying to do the same with the Contributors or Classifications field, pressing return causes all changes to be saved and discards whatever you wrote in the field.
Reproducing the bug
- Go to any edition’s edit page
- Focus the Contributors or Classifications text input field
- Type any valid text
- With the text field still focused, press the return key on your keyboard
- Expected behavior: The text you just wrote gets added as a contributor/classification
- Actual behavior: The text gets discarded, but any other changes you made get saved to the edition. The return key behaves like the Save button at the bottom of the page.
Context
- Browser (Chrome, Safari, Firefox, etc): Safari
- OS (Windows, Mac, etc): iPadOS 18.3
- Logged in (Y/N): Y
- Environment (prod, dev, local): prod
Note: My keyboard doesn’t have a dedicated enter key, so I’m not sure if the problem occurs both with return and enter keypresses.
Breakdown
Requirements Checklist
- Pressing Enter in the Contributors or Classifications field should enter the classification and not trigger a full page save.
Related files
openlibrary/openlibrary/plugins/openlibrary/js/edit.js
Lines 235 to 253 in 9357c65
Stakeholders
Instructions for Contributors
- Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.
Metadata
Metadata
Assignees
Labels
Issues related to features that librarians particularly need. [managed]Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed]Issues that may have been abandoned by assigneesAn issue, but should be worked on when no other pressing work can be done. [managed]Issues related to the user editing/wiki editing experience. [managed]Something isn't working. [managed]