details: https://code.openbravo.com/erp/devel/pi/rev/9705f4af28aa
changeset: 13848:9705f4af28aa
user: Martin Taal <martin.taal <at> openbravo.com>
date: Wed Sep 28 07:06:25 2011 +0200
summary: Related to issue 18072: Focus handling in form and grid editing
needs to be cleaned up, results in unpredictable behavior
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
| 11 ++++-----
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (50 lines):
diff -r f645c89d74af -r 9705f4af28aa
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
Wed Sep 28 07:05:00 2011 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
Wed Sep 28 07:06:25 2011 +0200
@@ -398,25 +398,25 @@
if (focusItem && focusItem.isFocusable()) {
focusItem.focusInItem();
this.view.lastFocusedItem = focusItem;
- this.selectFocusItemValue();
+ this.selectFocusItemValue(true);
} else {
// find a new one
this.computeFocusItem(focusItem);
if (this.getFocusItem() !== focusItem && this.getFocusItem()) {
focusItem.focusInItem();
- this.selectFocusItemValue();
+ this.selectFocusItemValue(true);
this.view.lastFocusedItem = focusItem;
}
}
},
- selectFocusItemValue: function() {
+ selectFocusItemValue: function(delayCall) {
if (!this.getFocusItem() || !this.view.isActiveView()) {
return;
}
// if not explicitly set to false, select its value
if (this.getFocusItem().selectOnFocus !== false) {
- if (isc.Browser.isIE) {
+ if (delayCall || isc.Browser.isIE) {
this.getFocusItem().delayCall('selectValue', [], 100);
} else {
this.getFocusItem().selectValue();
@@ -745,7 +745,7 @@
}
}
- this.redraw();
+ this.markForRedraw();
delete this.inFicCall;
this.view.toolBar.updateButtonState(true);
@@ -799,7 +799,6 @@
delete this.ignoreFirstFocusEvent;
}
} else {
- this.redraw();
this.view.viewGrid.refreshEditRow();
}
}
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits