Openbravo Issue Tracking System - POS2
View Issue Details
0047178POS2POSpublic2021-06-17 18:152021-07-01 11:48
AugustoMauch 
AugustoMauch 
normalminorhave not tried
closedfixed 
5
 
 
No
0047178: JIRA-1902: First click after changing the keymap page does not select the clicked element
Users can drag a keymap to change the current page, if the keymap has several pages. Sometimes, clicking a keymap element right after changing the current page by dragging does not produce the expected result (i.e. the clicked keymap category is not selected).

This happens only if the position of the cursor when the drag has been long enough to change the page is outside the keymap.
1- Open WebPOS
2- Select the Store Keymap
3- Make the window narrow to change the category keymap layout so that only two are displayed in each page, so that the keymap contains several pages.
4- Drag the keymap from right to left, starting from the right part of the keymap so that when the page is changed the cursor is still in the keymap. Click on a keymap category after the page is changed -> it will be selected, as expected
5- Repeat the same action, but when dragging the page start from the left part of the keymap so that the page is changed when the cursor is outside the keymap, to its left. Click on a keymap category after the page is changed -> it will not be selected, an extra click is required -> this is wrong

If Device mode is on (by using a touch device or by activating it in the dev tools), changing the page in both steps 4 and 5 will fail.
No tags attached.
related to defect 0046581 closed hernan-dp [21Q2] JIRA-1902: The swipe gesture scrolls different in the Carousel component 
depends on backport 0047268TAP closed AugustoMauch JIRA-1902: First click after changing the keymap page does not select the clicked element 
Issue History
2021-06-17 18:15AugustoMauchNew Issue
2021-06-17 18:15AugustoMauchAssigned To => AugustoMauch
2021-06-17 18:15AugustoMauchTriggers an Emergency Pack => No
2021-06-17 20:21AugustoMauchSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22745#r22745
2021-06-17 21:07hgbotNote Added: 0129633
2021-06-18 12:02dmiguelezResolution time => 1626559200
2021-06-18 12:02dmiguelezStatusnew => acknowledged
2021-06-28 19:32guilleaerStatusacknowledged => scheduled
2021-06-28 19:35guilleaerRelationship addedrelated to 0046581
2021-06-28 19:35guilleaerSummaryFirst click after changing the keymap page does not select the clicked element => JIRA-1902: First click after changing the keymap page does not select the clicked element
2021-06-28 19:36guilleaerResolution time1626559200 => 1625608800
2021-07-01 11:48hgbotResolutionopen => fixed
2021-07-01 11:48hgbotNote Added: 0130053
2021-07-01 11:48hgbotStatusscheduled => closed
2021-07-01 11:48hgbotNote Added: 0130054

Notes
(0129633)
hgbot   
2021-06-17 21:07   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/569 [^]
(0130053)
hgbot   
2021-07-01 11:48   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/569 [^]
(0130054)
hgbot   
2021-07-01 11:48   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 376698953968db125b65545d5cb77a28fa424d17
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 2021-07-01T11:48:17+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/376698953968db125b65545d5cb77a28fa424d17 [^]

Fixes ISSUE-47178: First click after page change does not work sometimes

Two problems have been fixed:
- In touch devices there was no need to ignore the mouse up right after changing the page, because the onClickCapture event is not triggered
- In other devices sometimes (i.e. when mouse was outside keymap) onClickCapture was not triggered. This has been fixed by replacing it
with a mouseup event listener to the main window

---
M web-jspack/org.openbravo.core2/src/components/BaseKeymap/hooks/usePagination.js
---