maxjackie
maxjackie

Reputation: 23312

Tabindex for input type file in IE

When you render: <input type="file" />

you get a box and a button, right? (At least in Firefox and IE.)

in IE how you can tab to (focus) both the box and the button or only button.

Upvotes: 0

Views: 1301

Answers (2)

Ms2ger
Ms2ger

Reputation: 15993

You get a box and a button, right?

Nope. Google Chrome on Ubuntu, for example, doesn't have a textbox. You shouldn't expect every browser on every OS to have the same ugly form widgets as IE.

Upvotes: 0

AmbrosiaDevelopments
AmbrosiaDevelopments

Reputation: 2592

The text box and button act as the one element in the browsers so you can only set the tab index to the thing as a whole, not each element. To focus the file input use: $('input[type=file]').focus();

Upvotes: 1

Related Questions