Bug 9120

Summary: Typing the ENTER key when submitting a tag from search results reloads the page
Product: Koha Reporter: Owen Leonard <oleonard>
Component: OPACAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: aleisha, chris, jonathan.druart, nengard, tomascohen, veron
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=2537
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 9120: Prevent form submission on adding tags - OPAC
[Signed-off] Bug 9120: Prevent form submission on adding tags - OPAC
[PASSED QA] Bug 9120: Prevent form submission on adding tags - OPAC
Bug 9120: Prevent form submission on adding tags - OPAC

Description Owen Leonard 2012-11-20 20:01:10 UTC
If you have  TagsInputOnList enabled and you are entering tags from the OPAC search results page, typing ENTER instead of clicking the "Add" button reloads the page without submitting the tag. The tag submission operation should be triggered without affecting the page state.
Comment 1 Jonathan Druart 2015-03-18 16:26:56 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2015-03-20 13:56:27 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2015-03-20 18:13:37 UTC
Created attachment 37071 [details] [review]
[PASSED QA] Bug 9120: Prevent form submission on adding tags - OPAC

At the OPAC, if the user adds tags pressing 'Enter', the page is
reloaded and the tags are not added.
To prevent that, this patch suggests to block the "press enter" event on
the inputs.

Test plan:
0/ Confirm the bad behavior, without this patch.
1/ Apply this patch and confirm nothing happen on pressing enter when
the focus is on the add tag input (At the opac, on the result view).

Patch works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi 2015-03-30 16:51:41 UTC
Patch pushed to master.

Thanks Jonathan!
Comment 5 Aleisha Amohia 2015-03-31 03:48:04 UTC Comment hidden (obsolete)
Comment 6 Chris Cormack 2015-03-31 05:44:31 UTC
Pushed to 3.18.x will be in 3.18.6