Infinite Scrolling + KeyTable focus problem with sample

Infinite Scrolling + KeyTable focus problem with sample

giorgio79giorgio79 Posts: 43Questions: 0Answers: 0
edited January 2011 in KeyTable
Hello Guys,

I have a nice KeyTable + Infinite Scrolling example going on here
http://s53452.gridserver.com/DataTables-1.7.5/extras/KeyTable/datatable_scrolling_keytable.html

However, after I start to scroll KeyTable focus is lost, and when I try to click a cell, or move KeyTable with arrow keys the browser focus in Firefox jumps to the bottom of the page.

Any tips?

Replies

  • allanallan Posts: 63,676Questions: 1Answers: 10,497 Site admin
    Hi giorgio79,

    I'll just reply in this thread, rather than the other ones as well.

    The reason you are having issues here is because DataTables is effectively doing paging for the infinite scrolling - i.e. when it loads more data, that is really just the next page. Now the reason that this is a problem, is because KeyTable doesn't know anything about this - DataTables is working in a quite different mode from what it was expecting.

    There is unfortunately, no "quick fix" for this, that I can currently think of - it's simply the way it's all been put together and this is a limitation. It's certainly possible to overcome the limitation, but I think it will probably take a fair little bit of work unfortunately. Until then, non-infinite scrolling should work fine with KeyTables.

    > 1. When clicking with the mouse, I need to click exactly at the text to make it editable straight away. It would be nice to detect the entire cell

    It seems to work okay for me. It needs a double click, but I'm sure that can be override with the jEditable stuff. Have a look at the jEditable documentation.

    > 2. After scrolling KeyTable focus stays and does not follow scrolling

    See above

    > 3. Would love to make it work with keyboard navigation, so [...]

    You could use the KeyTable event handling for this. There is documentation for it here: http://datatables.net/extras/keytable/events . Focus and blur are the two event which will be of interest.

    Regards,
    Allan
This discussion has been closed.