Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Format on focus-in is not applied in TextItem

    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":

    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;
    
            
            if (!wasShowingInFieldHintAsValue && this._mouseIsDown) return;
            .....
    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

    #2
    A change was made on November 30 which should address this for you - please retest with a more recent build.

    Comment


      #3
      Actually, we spoke to soon there - this change was only made to the 5.1 codebase - we'll port it to 5.0 in the next day or so.

      Comment

      Working...
      X