You found a bug! We've classified it as EXTGWT-3239 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Oct 2013
    Location
    Grantham, UK
    Posts
    6
    Vote Rating
    0
    Stik is on a distinguished road

      0  

    Default Live grid horizontal scroll position changes on vertical scroll

    Live grid horizontal scroll position changes on vertical scroll


    My situation: I have a live grid that has more columns than fit in view, so there is a horizontal scrollbar along the bottom. If the user has scrolled to the right and then scrolls up or down the grid the view snaps back to the left in increments each time the grid fetches the next block of records. This presents a poor user experience.

    The following project demonstrates this on GWT 2.5.1/GXT 3.0.6

    https://drive.google.com/file/d/0B45...it?usp=sharing

    It creates a Grid that displays 30 columns and 5000 records in batches of 200. Scroll to the far right, then scroll down the grid, the view will scroll back to the left.

    I have attempted two ways to "fix" this, flip the value of PagingGridBug1.attemptA to switch between them. The second attempt works better, however it still fails occasionally, and feels very much like a hack:

    Attempt A:
    Exposes the preventScrollToTopOnRefresh flag in LiveGridView, this looks as though it should stop the scrollbars moving. It seems to have no effect

    Attempt B:
    Use getScrollState before loading a block of records and then restore the scroll state in a deferred call once they're finished. This mostly works, but i think there's timing issues as occasionally it will still fail to move it back. These seem worse the busier the application is getting, in my actual webapp which has many grids and widgets on screen it rarely catches it. Additionally, it looks a bit rubbish since the user sees the view flick to the left and then back again each time.


    This feels like a bug to me. If you've got any suggestions on how to work around it for the meantime then they'd be welcome

    Cheers

    Stik

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    380
    Vote Rating
    15
    branflake2267 will become famous soon enough

      0  

    Default


    Thanks for the report. We have some fixes on the way for something similar and will add this on. I'll see if I can find a workaround shortly as well.

    Brandon

  3. #3
    Sencha - GXT Dev Team
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    380
    Vote Rating
    15
    branflake2267 will become famous soon enough

      0  

    Default


    I've found the offender 'calculateVBar', and looking at the wiring change now. I'll update the thread once the issue is fixed.

    In the mean time, the calculateVBar can be overriden during refresh. I haven't added any fancy logic for this b/c it's needed at times, although I'll update the thread once I have more progress on the issue.

    Code:
    public class BodgeLiveGridView<M> extends LiveGridView<M> {
        @Override
        protected void calculateVBar(boolean force) {
          // ignore on scrolling - tmp workaround, no logic applied to turn on or off at this time.
          //super.calculateVBar(force);
        }
      }
    Brandon

  4. #4
    Sencha - GXT Dev Team
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    380
    Vote Rating
    15
    branflake2267 will become famous soon enough

      0  

    Default


    This is a more specific workaround for the issue:
    Code:
    public class BodgeLiveGridView<M> extends LiveGridView<M> {
        private boolean preventCalculateVBar;
    
    
        /**
         * Handles clearing the store.
         *
         * @param se the event that cleared the store
         */
        @Override
        protected void onClear(StoreClearEvent<M> se) {
          boolean previous = preventCalculateVBar;
          preventCalculateVBar = true;
          refresh(false);
          preventCalculateVBar = previous;
        }
        
        @Override
        protected void calculateVBar(boolean force) {
          if (preventCalculateVBar) {
            return;
          }
          super.calculateVBar(force);
        }
      }

  5. #5
    Sencha Premium Member
    Join Date
    Oct 2013
    Location
    Grantham, UK
    Posts
    6
    Vote Rating
    0
    Stik is on a distinguished road

      0  

    Default


    Oops, didn't spot your reply. Thanks for taking the time to look into this, your fix has worked much better than mine did

    Stik

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi