Results 1 to 6 of 6

Thread: problem with livegrid, when you use the keyboard a lot

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jun 2017
    Posts
    3

    Default problem with livegrid, when you use the keyboard a lot

    Hi,

    I found a problem with livegrid. Sometimes, when you use the keyboard a lot to navigate a grid, there is a loss of focus.

    To reproduce the problem :

    - http://examples.sencha.com/gxt/4.0.2...Place:livegrid
    - keep pressed arrow down key, long time
    - keep pressed arrow up key, long time
    - the widget will lose focus...

    And if you insist, sometimes you get a javascript exception : "Error: Exception caught; (TypeError) : Cannot read property 'c' of null".

    Dominique.

  2. #2
    Sencha User
    Join Date
    Jun 2017
    Posts
    3

    Default

    A example of this exception with Chrome Version 58.0.3029.110 (64-bit) :


  3. #3
    Sencha Sr Product Manager
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    1,164

    Default

    I'm looking into why this is happening and will get back to you.

    Thanks,
    Brandon

  4. #4
    Sencha Sr Product Manager
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    1,164

    Default

    I've found the issue. Turns out when the loader fires to load the page when navigating up, the offset is off by one, and the row is removed and focus is lost to the outer element, the body. I won't have time to fix it today and find a better workaround, but I have found something that may work for you in the mean time. After vacation I can take a better look at this and fix it.

    If I add a load handler and after the load focus on the first row, you can page up. But you'll notice you'll be one behind.
    Code:
        pagingLoader.addLoadHandler(new LoadHandler<FilterPagingLoadConfig, PagingLoadResult<Data>>() {
          @Override
          public void onLoad(LoadEvent<FilterPagingLoadConfig, PagingLoadResult<Data>> event) {
            if (beforeSelected != null) {
              //grid.getSelectionModel().select(beforeSelected, false);
              int index = grid.getStore().indexOf(beforeSelected);
              //grid.getSelectionModel().select(index, false);
              
              GWT.log("\t\t @@@@@@@@@ after load " + index);
              
              Timer t = new Timer() {
                @Override
                public void run() {
                  grid.getView().focusCell(0, 0, false);
                  GWT.log("\t\t @@@@@@@@@ AFTER ");
                }
              };
              t.schedule(500);
            }
    });

  5. #5
    Sencha Sr Product Manager
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    1,164

    Default

    Oops I forgot a piece. I sued a before handler too.

    Code:
    pagingLoader.addBeforeLoadHandler(new BeforeLoadHandler<FilterPagingLoadConfig>() {
          @Override
          public void onBeforeLoad(BeforeLoadEvent<FilterPagingLoadConfig> event) {
            beforeSelected = grid.getSelectionModel().getSelectedItem();
    
    
            GWT.log("\t\t ######### before load " + beforeSelected);
          }
        });
    
    
        pagingLoader.addLoadHandler(new LoadHandler<FilterPagingLoadConfig, PagingLoadResult<Data>>() {
          @Override
          public void onLoad(LoadEvent<FilterPagingLoadConfig, PagingLoadResult<Data>> event) {
            if (beforeSelected != null) {
              //grid.getSelectionModel().select(beforeSelected, false);
              int index = grid.getStore().indexOf(beforeSelected);
              //grid.getSelectionModel().select(index, false);
              
              GWT.log("\t\t @@@@@@@@@ after load " + index);
              
              Timer t = new Timer() {
                @Override
                public void run() {
                  grid.getView().focusCell(0, 0, false);
                  GWT.log("\t\t @@@@@@@@@ AFTER ");
                }
              };
              t.schedule(500);
            }
    
    
          }
        });

  6. #6
    Sencha User
    Join Date
    Jun 2017
    Posts
    3

    Default

    Thank you for this response and workaround. At this time, our product is not released yet, so we will wait for official fix. Good vacation.

    Regards,
    Dominique.

Similar Threads

  1. LiveGrid Keyboard Navigation Support Problem
    By TrojanMyth in forum Sencha GXT Bugs
    Replies: 0
    Last Post: 25 Oct 2012, 9:41 AM
  2. Masked LiveGrid problem
    By support_csd_kz in forum Ext GWT: Discussion
    Replies: 5
    Last Post: 26 Apr 2010, 4:35 AM
  3. LiveGrid Buffering problem
    By ranjeet in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 7 Dec 2009, 2:22 AM
  4. [livegrid problem] store's autoLoad property causes Exception
    By aj3423 in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 25 Mar 2009, 7:55 PM
  5. Livegrid problem in Firefox
    By rhytha in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 19 Aug 2008, 5:11 PM

Posting Permissions

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