Openbravo Issue Tracking System - POS2
View Issue Details
0057282POS2Corepublic2024-11-26 12:442025-03-27 12:07
jarmendariz 
Triage Platform Base 
normalmajorhave not tried
closedduplicate 
5
 
 
No
No
0057282: Accordion click event is called on dragging mouse/touch up
In a BaseSwipeableLine that contains a BaseAccordion as the middle element, when released the touch/mouse on a drag event, the onClick event is also called and it shouldn't. This is currently patched using an empty onClick event on the BaseAccordion, but this function is still called.
This effect can be reproduced using the TicketLineGroup component. To do this, disable the TicketLineAggregatorRegistry in POS2's ob-init.js.
Also add a log line in TicketLineGroupAccordion.jsx

    <BaseAccordion
      expanded={isExpanded}
      label={title}
      onChange={(e, expanded) => {
        setIsExpanded(expanded);
      }}
      onClick={() => {
        console.log('accordion click');
      }}
...

Then in POS:
- Create a ticket with multiple lines, and close it by paying
- In the new ticket, go to tickets window, and in the options click on "verified returns" on the first entry in the grid.
- Select all lines and accept
- Now you should see the order's ticket lines grouped on an accordion component.

Notice that when dragging the header component to see the right section, the onClick event in BaseAccordion is also executed.
No tags attached.
Issue History
2024-11-26 12:44jarmendarizNew Issue
2024-11-26 12:44jarmendarizAssigned To => Triage Platform Base
2024-11-26 12:44jarmendarizOBNetwork customer => No
2024-11-26 12:44jarmendarizTriggers an Emergency Pack => No
2025-03-27 12:07hgbotNote Added: 0177452
2025-03-27 12:07hgbotStatusnew => closed
2025-03-27 12:07hgbotResolutionopen => duplicate

Notes
(0177452)
hgbot   
2025-03-27 12:07   
Issue exported to Jira: https://openbravo.atlassian.net/browse/RM-24185 [^]