Announcement

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

    Loss of focus after adding member with animateMembers:true

    SmartClient Version: v9.1p_2015-09-16/Pro Development Only (built 2015-09-16)
    Google Chrome Version 49.0.2623.110 (64-bit)

    We are trying to set focus to a text field once the form has been added to a layout. However, when we have animateMembers set to true, the focus is lost once the animation completes. How would I achieve the result so that the focus stays after the animation is complete? Is there a callback for animation when using addMember (similar to animateShow, etc)?

    In the demo below, click the button to add the form. You will notice that the field gains focus but once the slide animation is complete, the focus is lost.

    Code:
    isc.VLayout.create({
        animateMembers: true,
        ID: "abc",
        members: [
            isc.Button.create({
                click: function() {
                    abc.addMember(isc.DynamicForm.create({
                        ID: "hi",
                        fields: [{
                            name: "filterName",
                            type: "text"
                        }]
                    }));
                    hi.getField("filterName").focusInItem();
                }
            })
        ]
    });
    Last edited by shresthg_des; 4 Apr 2016, 11:15.

    #2
    Focus should not be lost in this case, so we'll be taking a look at that. However, a way to get a notification of animation completing would be to add the form with visibility:"hidden" then use showMember() to reveal it, since showMember() supports a callback.

    Comment


      #3
      We've made a framework change which should address this issue. Please try the next nightly build, dated April 6 or above.

      Regards
      Isomorphic Software

      Comment


        #4
        Thanks! Does the framework change resolve the demo mentioned in this post?

        Comment


          #5
          Yes, it does.

          Comment

          Working...
          X