Openbravo Issue Tracking System - Retail Modules
View Issue Details
0036565Retail ModulesWeb POSpublic2017-02-03 10:112017-08-02 16:06
jonibc 
mario_castello 
highmajoralways
closedfixed 
5
 
RR17Q1.3 
migueldejuana
No
0036565: [SERQA 2408] Focus remains in previous window.
Focus remains in the previous window, when a modal is raised over another modal, if the user press the key "ESC", both windows hides.

We tried a workaround to avoid lost the focus changing it to the focuskeeper, but 'Use External Input' flag is set to N, it is impossible to get the focus back for any input field.
Modify the file (Module: POSTerminal File: web/org/openbrabvo.retail.posterminal/js/pointofsale/view/subwindows/customers/components/sharedcomponents.js) or edit the javascript directly in Chrome Developer Tools and add the following code to raise the receipt properties modal dialog on blur event in customer creation window:

blur: function () {
    OB.MobileApp.view.waterfall('onShowPopup', {
        popup: 'receiptPropertiesDialog'
      });
}

Also if we add the following code, we can check that when we raise a popup the problem can not be reproduced:

blur: function () {
   OB.UTIL.showConfirmation.display('Test no fail');
}
In executeOnShow event of the modal add the following code to change the focus:

WARNING: This solution does not work if 'Use External Input' flag is set to N.

setTimeout(function () {
  var k = document.getElementById('_focusKeeper');
  k.focus();
}, 20);
No tags attached.
blocks defect 0035152 closed mario_castello [SERQA 2408] Focus remains in previous window. 
Issue History
2017-08-01 11:56marvintmTypedefect => backport
2017-08-01 11:56marvintmTarget Version => RR17Q1.3
2017-08-01 12:01hgbotCheckin
2017-08-01 12:01hgbotNote Added: 0098297
2017-08-01 12:01hgbotStatusscheduled => resolved
2017-08-01 12:01hgbotResolutionopen => fixed
2017-08-01 12:01hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/68def009463444e2b8494963b7df2a93d0b8992e [^] => http://code.openbravo.com/retail/backports/3.0RR17Q1.3/org.openbravo.mobile.core/rev/abb7a5c9174dbcee3ad9de2459c7400bcde787f5 [^]
2017-08-02 16:06migueldejuanaReview Assigned Tomarvintm => migueldejuana
2017-08-02 16:06migueldejuanaNote Added: 0098347
2017-08-02 16:06migueldejuanaStatusresolved => closed

Notes
(0098297)
hgbot   
2017-08-01 12:01   
Repository: retail/backports/3.0RR17Q1.3/org.openbravo.mobile.core
Changeset: abb7a5c9174dbcee3ad9de2459c7400bcde787f5
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Tue Aug 01 11:58:35 2017 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR17Q1.3/org.openbravo.mobile.core/rev/abb7a5c9174dbcee3ad9de2459c7400bcde787f5 [^]

Fixed issue 36565. [SERQA 2408] Focus remains in previous window.

- Set the focus of one element when open a popup.
- By default selected the element that is marked as isDefaultAction.

---
M web/org.openbravo.mobile.core/source/component/ob-commonbuttons.js
---
(0098347)
migueldejuana   
2017-08-02 16:06   
tested and reviewed