Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent the enter key to submit the form in some fields that may be filled though a scanning device #1421

Closed
pronguen opened this issue Nov 9, 2020 · 5 comments · Fixed by #1772
Assignees
Labels
f: editor Concerns editor based on JSON schema AND custom editor p-Medium Medium priority (to be solved within 1-2 years)
Milestone

Comments

@pronguen
Copy link
Contributor

pronguen commented Nov 9, 2020

How it works

When editing a resource in a form, using the "enter" key saves the form. This is not the case for text area input fields.
The user does not expect this behaviour.

When entering an ISBN with a scan device configured for checkout; the device automatically sends an "enter" to the system. When this happen in a document editor form, the form is submitted but should not.

Improvement suggestion

Disable the default enter key behavior in specific fields such as identifiers, or barcodes:

  • document: identifiedBy.value
  • item: barcode
  • patron: barcode
  • ill request (pro interface): Identifier

Disable the enter key for the whole ILL request form in the public interface (the ideal enhancement, for later, is described here: #1771)

@pronguen pronguen added enhancement Improvement of an existing feature f: editor Concerns editor based on JSON schema AND custom editor pilot libraries labels Nov 9, 2020
@iGormilhit iGormilhit added p-Medium Medium priority (to be solved within 1-2 years) and removed triage labels Nov 17, 2020
@iGormilhit iGormilhit added this to the v1.0.1 milestone Dec 16, 2020
@jma
Copy link
Contributor

jma commented Jan 26, 2021

I disagree. This is a default behaviour and a best practice to submit a web form using the enter key. This is the case for example on every google form (login, etc.). Moreover since the submitting the form display the validation error it still useful. We needs to fix this wrong behaviour for scan device if it is needed.

@pronguen pronguen added p-Low Low priority and removed p-Medium Medium priority (to be solved within 1-2 years) labels Jan 26, 2021
@pronguen
Copy link
Contributor Author

@iGormilhit What is your opinion? Should we close this issue, considering that this is a setting to do in the scan device?

@iGormilhit iGormilhit modified the milestone: v1.0.1 Jan 26, 2021
@iGormilhit
Copy link

iGormilhit commented Jan 26, 2021

@pronguen I'm pretty sure that at least once I've encountered the issue of hitting the enter key to do something and was surprised to see the form being submitted.

@jma is right, but I think we need to identify in which situation hitting the enter key does not what the user is expecting. I'm going to make some tests and verify about a barcode scanner.

@pronguen
Copy link
Contributor Author

pronguen commented Feb 1, 2021

@jma @iGormilhit I know that it could be a default behaviour in a standard environment. But in libraries, there are barcodes and scanning devices everywhere.
It is important for the checkin/checkout that the device automatically sends an "enter", so that the librarian doesn't have to do for each transaction: scan (with device) + enter (with keyboard).
So imagine a library desk where the librarian catalogues books and do checkin/checkout in parallel. It is an issue.

@iGormilhit
Copy link

@pronguen I agree. I think that at least in the forms like documents, we could at least try to prevent the enter key to submit the form in specific fields such as Identifiers.

Thus we will keep:

  1. The standard behavior, except for specific fields.
  2. The standard behavior in the circulation form, where it's needed.

I propose to transform this issue in "Prevent the enter key to submit the form in some fields". And then to provide a list in the description of the issue.

@iGormilhit iGormilhit modified the milestones: v1.0.1, v1.0.0, v1.1.0 Feb 8, 2021
@iGormilhit iGormilhit added correction p-Medium Medium priority (to be solved within 1-2 years) and removed enhancement Improvement of an existing feature p-Low Low priority needs info labels Feb 8, 2021
@iGormilhit iGormilhit changed the title Enter should not save a form Prevent the enter key to submit the form in some fields that may be filled though a scanning device Feb 8, 2021
@iGormilhit iGormilhit removed this from the v1.1.0 milestone Mar 1, 2021
@iGormilhit iGormilhit added this to the v1.2.0 milestone Mar 1, 2021
jma added a commit to jma/rero-ils that referenced this issue Mar 16, 2021
* Prevents the enter key to submit the form in some fields that may be
  filled though a scanning device.
* Closes rero#1421.

Co-Authored-by: Johnny Mariéthoz <johnny.mariethoz@rero.ch>
jma added a commit to jma/rero-ils that referenced this issue Mar 16, 2021
* Prevents the enter key to submit the form in some fields that may be
  filled though a scanning device.
* Closes rero#1421.

Co-Authored-by: Johnny Mariéthoz <johnny.mariethoz@rero.ch>
jma added a commit to jma/rero-ils that referenced this issue Mar 16, 2021
* Prevents the enter key to submit the form in some fields that may be
  filled though a scanning device.
* Closes rero#1421.

Co-Authored-by: Johnny Mariéthoz <johnny.mariethoz@rero.ch>
jma added a commit to jma/rero-ils that referenced this issue Mar 16, 2021
* Prevents the enter key to submit the form in some fields that may be
  filled though a scanning device.
* Closes rero#1421.

Co-Authored-by: Johnny Mariéthoz <johnny.mariethoz@rero.ch>
jma added a commit to jma/rero-ils that referenced this issue Mar 16, 2021
* Prevents the enter key to submit the form in some fields that may be
  filled though a scanning device.
* Closes rero#1421.

Co-Authored-by: Johnny Mariéthoz <johnny.mariethoz@rero.ch>
@jma jma modified the milestones: v1.1.0, v1.2.0 Mar 17, 2021
jma added a commit to jma/rero-ils that referenced this issue Mar 17, 2021
* Prevents the enter key to submit the form in some fields that may be
  filled though a scanning device.
* Closes rero#1421.

Co-Authored-by: Johnny Mariéthoz <johnny.mariethoz@rero.ch>
@jma jma closed this as completed in #1772 Mar 30, 2021
jma added a commit that referenced this issue Mar 30, 2021
* Prevents the enter key to submit the form in some fields that may be
  filled though a scanning device.
* Closes #1421.

Co-Authored-by: Johnny Mariéthoz <johnny.mariethoz@rero.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: editor Concerns editor based on JSON schema AND custom editor p-Medium Medium priority (to be solved within 1-2 years)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants