View Full Version : How do you disable the Tab stop for a control?

13 Dec 2012, 12:43 PM
Does anyone know how to prevent a control from receiving the focus when tabbing? For example, I have a view with 5 text boxes and 2 buttons. However, I want to have the cursor skip over 2 of the text boxes when the user is tabbing through the fields.

I can use the tabIndex to control the order of the tabbing but I am looking for a way to skip tabbing on certain fields.


15 Dec 2012, 7:51 AM
Try to listen for the keydown event on an element and stop the event from there.

15 Dec 2012, 11:07 AM
tabIndex: -1 to disallow the field to focus with the tab key.

15 Dec 2012, 11:19 AM
Perfect, the -1 was exactly what I was looking for.