Reputation: 1608
Does there exist some trick other than tabindex attribute so that a div can get focus ?
Upvotes: 0
Views: 897
Reputation: 324707
Setting contenteditable="true"
will also allow a div to receive focus in browsers that support it (IE 5.5+, Firefox 3.0+, WebKit for a few years, not sure about Opera), though obviously with the side effect of making the div editable by the user.
<div contenteditable="true">Tab to me</div>
Upvotes: 3