bLengthChange-Combobox and the focus

bLengthChange-Combobox and the focus

miriammiriam Posts: 1Questions: 0Answers: 0
edited November 2013 in General
Hi there, im quite new to datatables.
And now there occured a problem, at least it's a problem for me =)
Now to the question.
Is there a way to focus the selected row rather than the combobox of the shown length for the datatable?
Every time a new length i.e. 50 is chosen, the combobox helds the focus, so if you press the arrow-keys up or down, you change
the length of the shown items, which shouldn't be. Usually the focus should stay on the selected row, but it doesn't.

I tried with [code]currentId.focus();[/code]
after the fnDraw-function, where currentId is the current row. But it didn't work.
I would be glad if some of you has a few solutions for me.

miriam

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    The select option list is working the way that an HTML form element will do - so I think the current behaviour is correct since it is what is expected. Activate the form control and it gains focus.

    You could blur() focus on it if you want on its `change` event, but you'd need to know where to restore focus to if you wanted to do that.

    Allan
This discussion has been closed.