1. #1
    Ext User
    Join Date
    Jan 2010
    Posts
    4
    Vote Rating
    0
    ledge is on a distinguished road

      0  

    Default Grid auto scrolls to top of row on mousedown

    Grid auto scrolls to top of row on mousedown


    Is there any way of disabling this behaviour? I've pored over all the relevent config options and can't find anything. (This is with forceFit: true in the viewConfig, to constrain the grid size and enable the scroll bars.)

    Thanks

  2. #2
    Sencha User bkraut's Avatar
    Join Date
    Nov 2007
    Location
    Maribor, Slovenia
    Posts
    402
    Vote Rating
    1
    bkraut is on a distinguished road

      0  

    Default


    Are you maybe reloading when onmousedown event is triggered?

  3. #3
    Ext User
    Join Date
    Jan 2010
    Posts
    4
    Vote Rating
    0
    ledge is on a distinguished road

      0  

    Default


    Nope, no reload. This happens with the basic xml grid demo at http://www.extjs.com/deploy/dev/exam.../xml-grid.html, simply with
    Code:
    viewConfig: {
        forceFit: true,
    }
    added to the GridPanel initialistion, and random text added to the xml to pad it out.

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    91
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    This is standard behavior (it's a bit unusual that you have rows that are higher than the grid).

    If you want to change this you will have to override Ext.grid.GridView.ensureVisible.

  5. #5
    Ext User
    Join Date
    Jan 2010
    Posts
    4
    Vote Rating
    0
    ledge is on a distinguished road

      0  

    Default


    Not sure what you mean by "rows higher than the grid". There's a lot of data in some of the cells.

    Anyway that works, thanks. Fwiw the reason we want to stop this is that if there's a link in a cell, in IE (7 and 8 at least) the scrolling behaviour overrides links - so if you click on a link in a cell whose top is not visible it scrolls to the top and does not follow the link.

  6. #6
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    91
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    In that case you could also override Ext.grid.GridPanel.processEvent to not process clicks on an <a> element.

  7. #7
    Ext User
    Join Date
    Jan 2010
    Posts
    4
    Vote Rating
    0
    ledge is on a distinguished road

      0  

    Default


    I think we'll stick with the quick 'n' dirty approach . Thanks again.

Thread Participants: 2