Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035152Retail ModulesWeb POSpublic2017-02-03 10:112017-08-01 11:56
jonibc 
mario_castello 
highmajoralways
closedfixed 
5
 
RR17Q2 
marvintm
No
0035152: [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.
depends on backport 0036565RR17Q1.3 closed mario_castello [SERQA 2408] Focus remains in previous window. 
Issue History
2017-02-03 10:11jonibcNew Issue
2017-02-03 10:11jonibcAssigned To => Retail
2017-02-03 10:11jonibcResolution time => 1487286000
2017-02-03 10:11jonibcTriggers an Emergency Pack => No
2017-02-07 08:49jonibcNote Added: 0094108
2017-02-07 08:49jonibcDescription Updatedbug_revision_view_page.php?rev_id=14498#r14498
2017-02-07 08:49jonibcProposed Solution updated
2017-02-07 08:55jonibcIssue Monitored: jonibc
2017-02-07 09:26jonibcSummary[STORE SERVER / SERQA 2408] Focus remains in previous window. => [SERQA 2408] Focus remains in previous window.
2017-02-08 15:16mario_castelloAssigned ToRetail => mario_castello
2017-02-08 15:17mario_castelloStatusnew => acknowledged
2017-02-08 15:23mario_castelloStatusacknowledged => scheduled
2017-02-15 17:38hgbotCheckin
2017-02-15 17:38hgbotNote Added: 0094371
2017-02-15 17:38hgbotStatusscheduled => resolved
2017-02-15 17:38hgbotResolutionopen => fixed
2017-02-15 17:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/68def009463444e2b8494963b7df2a93d0b8992e [^]
2017-02-20 09:41marvintmReview Assigned To => marvintm
2017-02-20 09:41marvintmStatusresolved => closed
2017-02-20 09:41marvintmFixed in Version => RR17Q2
2017-08-01 11:56marvintmStatusclosed => new
2017-08-01 11:56marvintmResolutionfixed => open
2017-08-01 11:56marvintmFixed in VersionRR17Q2 =>
2017-08-01 11:56marvintmStatusnew => scheduled
2017-08-01 11:56marvintmStatusscheduled => resolved
2017-08-01 11:56marvintmFixed in Version => RR17Q2
2017-08-01 11:56marvintmResolutionopen => fixed
2017-08-01 11:56marvintmStatusresolved => closed

Notes
(0094108)
jonibc   
2017-02-07 08:49   
Updated with error in proposed solution.
(0094371)
hgbot   
2017-02-15 17:38   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 68def009463444e2b8494963b7df2a93d0b8992e
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Thu Feb 09 10:35:49 2017 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/68def009463444e2b8494963b7df2a93d0b8992e [^]

Fixed issue 0035152: [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
---