Hi,
it seems that there is a problem with property TextItem.formatOnFocusChange. It is ignored on mouse-click event. If set to TRUE, display value should be formatted on every focus-in and focus-out event. It worked fine in SmartClient 4.x, but now in version 5.0 it does not work if field is focused by mouse click. I found in TextItem.js the row, which causes the problem. Method "TextItem._nativeElementFocus":
The last line is new in 5.0 version.
In our case, we have a text item with "hintAsValue == false", so formatting on focus-in event is applied only if item is focused by <TAB> keypress ... mouse click event is skipped :-(
Tested version: 5.0p v10.0p_2015-11-16
Browsers: IE11, FF41
Is it possible to change it to original behavior?
Thank you,
Ales
it seems that there is a problem with property TextItem.formatOnFocusChange. It is ignored on mouse-click event. If set to TRUE, display value should be formatted on every focus-in and focus-out event. It worked fine in SmartClient 4.x, but now in version 5.0 it does not work if field is focused by mouse click. I found in TextItem.js the row, which causes the problem. Method "TextItem._nativeElementFocus":
Code:
_nativeElementFocus : function (element, itemID) {
// if this focus came from a redraw, don't select- we want to retain the pre-redraw selection
var refocusAfterRedraw = this._refocussingAfterRedraw;
var returnVal = this.Super("_nativeElementFocus", arguments);
// Hide in-field hint if being shown
var wasShowingInFieldHintAsValue = this._showingInFieldHint;
this._hideInFieldHint();
// If this TextItem is readonly, don't change the selection.
if (this.isReadOnly()) return returnVal;
[B] if (!wasShowingInFieldHintAsValue && this._mouseIsDown) return;[/B]
.....
In our case, we have a text item with "hintAsValue == false", so formatting on focus-in event is applied only if item is focused by <TAB> keypress ... mouse click event is skipped :-(
Tested version: 5.0p v10.0p_2015-11-16
Browsers: IE11, FF41
Is it possible to change it to original behavior?
Thank you,
Ales
Comment