Results 1 to 7 of 7

Thread: [FIXED] GridView focusRow Bug with Safari

  1. #1
    Ext GWT Premium Member les's Avatar
    Join Date
    Sep 2008
    Posts
    48

    Default [FIXED] GridView focusRow Bug with Safari

    Using GXT 1.2, GridView's focusRow method will not scroll down to display the selected row using Safari browser (Mac or Windows version).

    FYI - GridView's focusRow method will correctly scroll up to display the selected row using Safari broswer (Mac or Windows version).

    This bug also exists running in Hosted Mode on a Mac (OS X 10.5.5)

    Test case:

    1. Add the following code to the GXT BasicGrid example. Note: you will need to make grid and store member variables.

    Code:
       
            Button topButton = new Button("Top");
            topButton.addSelectionListener(new SelectionListener<ComponentEvent>() {
                public void componentSelected(ComponentEvent ce) {   
                    grid.getSelectionModel().select(0);
                    grid.getView().focusRow(0);
                }
            });
            
            Button bottomButton = new Button("Bottom");
            bottomButton.addSelectionListener(new SelectionListener<ComponentEvent>() {
                public void componentSelected(ComponentEvent ce) {   
                    int index = store.getCount() - 1;
                    grid.getSelectionModel().select(index);
                    grid.getView().focusRow(index);
                }
            });
            
            add(topButton);
            add(bottomButton);
    3. Click the Bottom button. Notice that the last record is NOT in view. If you scroll down, you will notice that it is selected.

    4. Click Top button. Notice that the first record is selected and has been scrolled into view.

  2. #2
    Ext GWT Premium Member les's Avatar
    Join Date
    Sep 2008
    Posts
    48

    Default

    Comments?

  3. #3
    Ext GWT Premium Member les's Avatar
    Join Date
    Sep 2008
    Posts
    48

    Default

    Using 1.1.3, this now is an issue for FireFox on the Mac too.

    When you select a record, which isn't currently in view, FireFox will scroll down but not display the selected row (it's off by a few pixels).

  4. #4
    Sencha User darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242

    Default

    Fixed in SVN.

  5. #5
    Ext GWT Premium Member les's Avatar
    Join Date
    Sep 2008
    Posts
    48

    Default Not quite fixed...

    Darrell,

    Thanks for the fix. I grab the latest from SVN, but unfortunately, it isn't fixed (although it is better).

    With the latest changes:

    Using Safari and FireFox (on OS X), the GridView's focusRow method will scroll down to display, but NOT far enough to view the entire row.

    I have attached a screen shot:



  6. #6
    Sencha User darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242

    Default

    The code was not accounting for the presence of the horizontal scroll bar. This is fixed in SVN. Please confirm the changes.

  7. #7
    Ext GWT Premium Member les's Avatar
    Join Date
    Sep 2008
    Posts
    48

    Default Fixed!

    Hi Darrell,

    I have verified that the latest fix works - both on Safari and Firefox on OS X

    Ship it

    Thanks again...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •