Openbravo Issue Tracking System - POS2
View Issue Details
0049872POS2Corepublic2022-07-22 17:442022-08-19 14:16
guilleaer 
meriem_azaf 
normalminorhave not tried
closedfixed 
5
 
22Q4 
No
0049872: Buttons which opens popups are focused when popup is closed
Buttons which opens popups are focused when popup is closed

See this link [https://stackoverflow.com/questions/69047336/material-ui-closing-modal-leaves-focus-state-on-button-that-opened-it [^]]

It causes a problem in POS if after closing a popup a code which includes "whitespaces" is scanned because the button with the focus is pressed again
In live buids
Login in POS2
In main window add a product to the order
Press delete order button
Close de confirmation popup by pressing cancel or clicking on the background
See that focus is in delete order button again
Press space -> confirmation dialog is shown

When doing a scan with a REAL barcode scanner (cannot be simulated through dev tools console) a space press key event is triggered and the confirm dialog is shown again
Add prop disableRestoreFocus on dialog base component
No tags attached.
related to backport 004997722Q3 closed meriem_azaf Buttons which opens popups are focused when popup is closed 
Issue History
2022-07-22 17:44guilleaerNew Issue
2022-07-22 17:44guilleaerAssigned To => Triage Platform Base
2022-07-22 17:44guilleaerTriggers an Emergency Pack => No
2022-07-22 17:46guilleaerSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=24536#r24536
2022-07-27 08:23AugustoMauchAssigned ToTriage Platform Base => meriem_azaf
2022-07-27 08:24AugustoMauchStatusnew => scheduled
2022-07-27 12:45hgbotNote Added: 0139640
2022-08-06 11:52hgbotResolutionopen => fixed
2022-08-06 11:52hgbotStatusscheduled => closed
2022-08-06 11:52hgbotFixed in Version => 22Q4
2022-08-06 11:52hgbotNote Added: 0139932
2022-08-06 11:52hgbotNote Added: 0139933
2022-08-09 10:50hgbotFixed in Version22Q4 => 22Q3
2022-08-09 10:50hgbotNote Added: 0139998
2022-08-09 11:58AugustoMauchIssue cloned0049977
2022-08-09 12:22plujanFixed in Version22Q3 => 22Q4
2022-08-19 14:16AugustoMauchRelationship addedrelated to 0049977

Notes
(0139640)
hgbot   
2022-07-27 12:45   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/806 [^]
(0139932)
hgbot   
2022-08-06 11:52   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 46ae2b2427e0d1e8e3809444e0b8eed0d94143f4
Author: Meriem Azaf <meriem.azaf@openbravo.com>
Date: 06-08-2022 11:20:25
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/46ae2b2427e0d1e8e3809444e0b8eed0d94143f4 [^]

Fixes ISSUE-49872: Buttons which opens popups are focused when popup is closed

Buttons which opens popups are focused when popup is closed.

It causes a problem in POS if after closing a popup a code which includes "whitespaces" is scanned because the button with the focus is pressed again.

To fix this, we added disableRestoreFocus on dialog base component as a prop.

---
M web-jspack/org.openbravo.core2/src/components/BaseDialog/BaseDialog.jsx
---
(0139933)
hgbot   
2022-08-06 11:52   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/806 [^]
(0139998)
hgbot   
2022-08-09 10:50   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 04a65f406d08a6d176b4beac0020cb6f743a9eb3
Author: Meriem Azaf <meriem.azaf@openbravo.com>
Date: 09-08-2022 10:49:50
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/04a65f406d08a6d176b4beac0020cb6f743a9eb3 [^]

Fixes ISSUE-49872: Buttons which opens popups are focused when popup is closed

Buttons which opens popups are focused when popup is closed.

It causes a problem in POS if after closing a popup a code which includes "whitespaces" is scanned because the button with the focus is pressed again.

To fix this, we added disableRestoreFocus on dialog base component as a prop.

---
M web-jspack/org.openbravo.core2/src/components/BaseDialog/BaseDialog.jsx
---