Fixes issue 19830: Grid error message shown whenever the focus leaves the row
authorAugusto Mauch <augusto.mauch@openbravo.com>
Fri, 14 Sep 2012 11:30:37 +0200
changeset 17952 0ff1cc0c83af
parent 17951 3fa5c54af3f4
child 17953 58436acaacef
Fixes issue 19830: Grid error message shown whenever the focus leaves the row

When a row has validation errors, the error message should be shown whenever the focus leaves the row. That happens when either the enter, up arrow or down ar
row key is pressed.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Thu Sep 13 09:52:00 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Fri Sep 14 11:30:37 2012 +0200
@@ -2207,7 +2207,8 @@
       return;
     }
 
-    if (enterKey) {
+    // If leaving the row...
+    if (editCompletionEvent === 'enter' || editCompletionEvent === 'arrow_up' || editCompletionEvent === 'arrow_down') {
       // See issue https://issues.openbravo.com/view.php?id=19830
       this.view.standardWindow.getDirtyEditForm().validateForm();
     }