Announcement

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

    autoFocus in DynamicForm

    I may be wrong about this, but I believe the focus logic for the code below is backwards. What I am expecting is for the focus to start at the first time item instead of the last time item.

    Now, I know of a globalTabIndex, tabIndex property in form items but these properties are not ideal for our product.

    Ideally, we want the very first focusable form item to have focus in all of our screens.


    Code:
    isc.DynamicForm.create({autoFocus: true,
        fields: [
            {title:"Time", type:"time"}
        ]
    });
    
    isc.DynamicForm.create({autoFocus: true,top:225,
        fields: [
            {title:"Time", type:"time"}
        ]
    });
    
    isc.DynamicForm.create({autoFocus: true,top:350,
        fields: [
            {title:"Time", type:"time"}
        ]
    });

    #2
    What's happening is that each of the three forms steal focus from the last as they are drawn. The autoFocus property does not globally coordinate focus across all forms and other focusable elements. So you'll need to figure out the form where you want focus and set autoFocus only there.

    Comment


      #3
      But this would mean because applications built using our product can have dynamic screens, I would have to figure out a way to determine the very first dynamic form on each screen every time something changes...

      If this is the only way to solve this problem, what is the easiest, most efficient way of doing this?

      Comment


        #4
        We have no idea how your application code is structured, so we can't suggest the easiest way to identify the first of your automatically generated forms.

        Comment

        Working...
        X