Rows per page -- focus

Rows per page -- focus

johnmhoranjohnmhoran Posts: 1Questions: 0Answers: 0
edited February 2013 in General
I'm using aLengthMenu to create a dropdown for selecting the number of rows per page. When the user makes a selection, the display changes properly, but focus remains on the dropdown -- so if a user selects from the dropdown and then hits the page down key (hoping to scroll down the page), the dropdown itself scrolls rather than the page. See http://esininja.com/Library.aspx.

Is there a way to create a row-selection dropdown that will move the focus away from the dropdown once a number of rows is selected?

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    That's a standard browser interaction that it sounds like you want to override, not something that DataTables specifically does.

    You could add a 'change' event listener to the `select` node and call `blur()` when it changes. Might upset screenreader users, but I don't know for sure!

    Allan
This discussion has been closed.