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.
Created attachment 36991 [details] [review] 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).
Created attachment 37043 [details] [review] [Signed-off] 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 Véron <veron@veron.ch>
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>
Patch pushed to master. Thanks Jonathan!
Created attachment 37399 [details] 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> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Pushed to 3.18.x will be in 3.18.6