details:   https://code.openbravo.com/erp/devel/pi/rev/b68a8d9b9b6b
changeset: 17854:b68a8d9b9b6b
user:      Augusto Mauch <augusto.mauch <at> openbravo.com>
date:      Tue Sep 04 15:33:35 2012 +0200
summary:   Fixes issue 21546: Record are saved with success in view form

There was a problem with the focus after a record was saved in view form, that 
caused the record to be reopened in edit mode. This has been fixed by 
introducing a small delay before resetting the focus after saving a record.

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
 |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 5492d5749d01 -r b68a8d9b9b6b 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
     Tue Sep 04 13:09:31 2012 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
     Tue Sep 04 15:33:35 2012 +0200
@@ -1547,8 +1547,12 @@
       form.isSaving = false;
       view.toolBar.updateButtonState(true);
       if (form.isVisible() && storedFocusItem && 
storedFocusItem.isFocusable(true)) {
-        form.setFocusItem(storedFocusItem);
-        form.setFocusInForm();
+        // The setTimeout fixes issue 
https://issues.openbravo.com/view.php?id=21546
+        // that is only reproducible in certain versions of Chrome
+        setTimeout(function () {
+          form.setFocusItem(storedFocusItem);
+          form.setFocusInForm();
+        }, 10);
       }
 
       return false;

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to