Announcement

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

    ListGrid PickTree Issues

    I'm running SmartClient Version: SC_SNAPSHOT-2012-01-25_v8.2p/PowerEdition Deployment (built 2012-01-25)

    I am having some issues related to PickTree fields in ListGrids. I can replicate these issues in the SmartClient 8.2 feature explorer Edit by Row example.

    http://www.smartclient.com/docs/8.2/...html#editByRow

    The issues I am having are related to tabbing off of the PickTreeItem component. When editByCell is true or when the PickTreeItem is the last editable field in the ListGrid, the focus in the ListGrid will be lost when tabbing away from the editor. The following code can be used to reproduce the problem.

    Code:
    isc.ListGrid.create({
        ID: "countryList",
        width:550, height:224, alternateRecordStyles:true, cellHeight:22,
        // use server-side dataSource so edits are retained across page transitions
        dataSource: countryDS,
        // display a subset of fields from the datasource
    
        fields:[
            {name:"countryCode", title:"Flag", width:40, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png", canEdit:false},
            {name:"countryName"},
            {name:"member_g8"},
            {name:"population", formatCellValue:"isc.Format.toUSString(value);"},
            {name:"independence"},
    
    //ISSUE>>>>
    //When the pickTreeItem is the last editable field in the ListGrid, focus is lost when tabbing off of the pickTreeItem. This happens regardless of the editByCell issue mentioned below.
    
            {name:"continent", editorProperties: {
        editorType: "PickTreeItem",
        displayField: "name",
        valueField: "name",
        canEdit: true,
        valueTree: isc.Tree.create({
         modelType: "children",
    
         root: { name:"root", children: [
            { name: "America", children: [
                { name: "North America"},
                { name: "South America"}
            ]},
            { name: "Europe"},
            { name: "Asia"},
            { name: "Africa"},
            { name: "Australia/Oceania"}         
         ]}
        })
    }}
        ],
        autoFetchData: true,
        canEdit: true,
        
    //ISSUE>>>>
    //editEvent "click" causes issues with pickTreeItems responding to mouse clicks. This is fixed by using our own rowClick implementation.
    
        //editEvent: "click",
        rowClick: function (record, recordNum, fieldNum, keyboardGenerated) {
                    if(this.getEditRow()==recordNum && this.getEditCol()==fieldNum && this.getEditField().name=="continent") {
                        return false;
                    }
                    return this.startEditing(recordNum,fieldNum);
        },
    
    //ISSUE>>>>
    //editByCell will cause the list grid to lose focus when tabbing off of pickTreeItems
    
        editByCell: true,
        editOnFocus: true,
        listEndEditAction: "next"
    
    })
    Is there a work around for this issue or can it be fixed?
    Last edited by patrickmann; 17 May 2012, 04:31.

    #2
    I updated my original post to include my SC version info.

    SC_SNAPSHOT-2012-01-25_v8.2p/PowerEdition Deployment (built 2012-01-25)

    Comment


      #3
      Here is a YouTube video demonstrating the issue.

      http://youtu.be/q5QT7jb4nlM

      Please let me know if I need to provide any additional information.

      Thanks.

      Comment


        #4
        Updates:

        Tested on SmartClient_v82p_2012-05-16_PowerEdition

        The issue posted can still be reproduced. Interestingly a new bug has developed in this version. When editByCell is true, tabbing navigates up and down the columns instead left to right in each row.

        Tested on SmartClient_SNAPSHOT_v83d_2012-05-16_PowerEdition

        The issue posted appears to be resolved in 8.3, however the editByCell navigating up and down instead of left to right is occurring here too.

        Additional Questions

        Since the issue is fixed in 8.3, is there something I can change in the source code of 8.2 that will resolve this? If so, can you give me any hints as to what I need to change in the source?

        Is the Up/Down navigation a new feature or a bug in the current version? Is there a way to turn this off or set it to navigate left to right? Up/down navigation is not acceptable behavior per my development specifications.

        Thanks again for your help.
        Last edited by patrickmann; 16 May 2012, 21:14.

        Comment


          #5
          The Up/Down navigation on Tab keypress was a bad side effect of a fix in a somewhat unrelated area. This is now fixed (try the next nightly).

          We've applied a workaround to 8.2p for the issue whereby if the pickTreeItem is the last item in the row, hitting tab doesn't move you on to the next field.

          We've made a note of the issue with editEvent:click and will be investigating it, but no eta yet (and presumably this isn't blocking you since you have a workaround)

          Thanks
          Isomorphic Software

          Comment


            #6
            Thanks for the update. I'll check the next build.

            FYI. Further testing today revealed that ButtonItems have the same tabbing issue as the PickTreeItems. Will the workaround fix this as well? If not, can you apply the workaround to ButtonItems?

            Thanks again for you assistance.
            Patrick

            Comment


              #7
              The fix should apply to both PickTreeItems and ButtonItems. If this is not the case in your testing (with the new build) let us know and we'll take another look.

              Comment


                #8
                Test Results

                Overall the fix looks good. I found only found one new issue. It appears that the down arrow key no longer displays the PickTreeItem menu when I am focused on the editor. This is not critical as I can show the menu using shift-down arrow, but prior behavior allowed down arrow to show the menu. If the down arrow needs to be used for table navigation, then would it be possible to show the menu when "Space" is pressed?

                Tested SmartClient_v82p_2012-05-18_PowerEdition

                Code:
                1. PickTreeItem
                    a. Mouse Click Tests - [B]PASSED[/B]
                    b. Keyboard Tests
                        > Tabbing moves left to right - [B]PASSED[/B]
                        > Tabbing changes focus to next component - [B]PASSED[/B]
                        > KeyPress (down arrow) displays the menu - [B]FAILED*****[/B]
                        > KeyPress (shift - down arrow) displays the menu - [B]PASSED[/B]
                
                2. ButtonItem
                    a. Mouse Click Tests - [B]PASSED[/B]
                    b. Keyboard Tests
                        > Tabbing moves left to right - [B]PASSED[/B]
                        > Tabbing changes focus to next component - [B]PASSED[/B]
                        > KeyPress (space) invokes click event - [B]PASSED[/B]
                Thanks again for your help.

                Patrick
                Last edited by patrickmann; 18 May 2012, 05:44.

                Comment

                Working...
                X