Bug 41408 - POS Inline Editing Triggers Form Submission on Enter Key
Summary: POS Inline Editing Triggers Form Submission on Enter Key
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Point of Sale (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Martin Renvoize (ashimema)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-09 15:33 UTC by Martin Renvoize (ashimema)
Modified: 2025-12-13 22:44 UTC (History)
1 user (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41408: Added e.preventDefault() and e.stopPropagation() to edit (1.87 KB, patch)
2025-12-09 15:55 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 41408: Added e.preventDefault() and e.stopPropagation() to edit (1.92 KB, patch)
2025-12-13 22:44 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2025-12-09 15:33:31 UTC
On the Point of Sale (POS) page, when editing the cost of an item using inline table editing (clicking to edit the price), pressing Enter to accept the new price inadvertently submits the entire payment form instead of just accepting the inline edit.

Steps to Reproduce
1. Navigate to the Point of Sale page (pos/pay.pl)
2. Add an item to "This sale" table using the '+Add' button from the left table
3. Click on the "Cost" cell to edit the price inline
4. Change the value
5. Press Enter to accept the new price

Expected Behavior
- The Enter key should accept the inline edit and update the cell value
- The form should NOT be submitted
- User should be able to continue editing other fields or adding more items

Actual Behavior
- The Enter key accepts the inline edit BUT also triggers the form submission
- The payment form is submitted prematurely
- User cannot continue with the transaction setup
Comment 1 Martin Renvoize (ashimema) 2025-12-09 15:55:43 UTC
Created attachment 190352 [details] [review]
Bug 41408: Added e.preventDefault() and e.stopPropagation() to edit

Prevent inline editing in POS for the cost and quantity fields from submitting the form on 'Enter'.

Test plan:
1. Ensure the POS page is accessible (Set UsePointOfSale, add a Cash
   Register and some Debit types for sale)
2. Navigate to the Point of Sale page (pos/pay.pl)
3. Add an item to the "This sale" table
4. Click on the "Cost" cell to edit the price inline
5. Change the value and press Enter
6. Expected: The cell value should update without submitting the form
7. Try editing the "Quantity" field as well (same fix applies)
8. Complete a normal transaction to ensure form submission still works with the submit button
Comment 2 David Nind 2025-12-13 22:44:28 UTC
Created attachment 190486 [details] [review]
Bug 41408: Added e.preventDefault() and e.stopPropagation() to edit

Prevent inline editing in POS for the cost and quantity fields from submitting the form on 'Enter'.

Test plan:
1. Ensure the POS page is accessible (Set UsePointOfSale, add a Cash
   Register and some Debit types for sale)
2. Navigate to the Point of Sale page (pos/pay.pl)
3. Add an item to the "This sale" table
4. Click on the "Cost" cell to edit the price inline
5. Change the value and press Enter
6. Expected: The cell value should update without submitting the form
7. Try editing the "Quantity" field as well (same fix applies)
8. Complete a normal transaction to ensure form submission still works with the submit button

Signed-off-by: David Nind <david@davidnind.com>