Bug 9120 - Typing the ENTER key when submitting a tag from search results reloads the page
Summary: Typing the ENTER key when submitting a tag from search results reloads the page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-20 20:01 UTC by Owen Leonard
Modified: 2015-12-03 22:02 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 9120: Prevent form submission on adding tags - OPAC (2.56 KB, patch)
2015-03-18 16:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
[Signed-off] Bug 9120: Prevent form submission on adding tags - OPAC (2.74 KB, patch)
2015-03-20 13:56 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 9120: Prevent form submission on adding tags - OPAC (2.70 KB, patch)
2015-03-20 18:13 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 9120: Prevent form submission on adding tags - OPAC (2.74 KB, text/plain)
2015-03-31 03:48 UTC, Aleisha Amohia
Details

Note You need to log in before you can comment on or make changes to this bug.
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 (khall) 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 (tcohen) 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