document.activeElement returns body in onblur handler
Between leaving the old element and entering the new element the active element is indeed the document/body itself. Demo: http://jsfiddle.net/u3uNP/
Between leaving the old element and entering the new element the active element is indeed the document/body itself. Demo: http://jsfiddle.net/u3uNP/
Just set the TabStop property of the Labels to false and the TabIndex property of the Buttons to whatever you want. You can do it right in the Properties window of the designer.
Not sure why nobody has mentioned visibility: hidden yet. Setting display: none can in some cases mess up logic when dealing with dimensions of non-visual elements. visibility will persist the dimensions just like opacity: 0 would do, but also disable any tabbable children. Example: <div style=”visibility: hidden;”> <a href=”#”>I’m only tabbable if my parent is … Read more
Strange question, but yes that’s the basic idea: $(“:input:not(:hidden)”).each(function (i) { $(this).attr(‘tabindex’, i + 1); }); This uses :input to get everything including buttons and text areas. :not(:hidden) will just exclude the hidden inputs to avoid unnecessary tabs.
DIV elements are not compatible with tabindex in HTML4). (NOTE HTML 5 spec does allow this, however, and it commonly works regardless) The following elements support the tabindex attribute: A, AREA, BUTTON, INPUT, OBJECT, SELECT, and TEXTAREA. Essentially anything you would expect to be able to hold focus; form elements, links, etc. What I think … Read more
You can set the tabindex=”-1″ on this element so it’s ignored in the tab order. 0 tells the browser to figure out the tab order on it’s own, -1 tells the browser to ignore it.
tabindex assignments are handled the following way (for elements that support the tabindex attribute): Positive numbers (1,2,3…32767) are handled in tab order. 0 is handled in source order (the order it appears in the DOM) -1 is ignored during tabbing but is focusable. This information is taken from : http://www.w3.org/TR/html401/interact/forms.html#adef-tabindex
Setting the tabindex to -1 will render an element untabbable (if that’s a word) 🙂 <input type=”text” name=”username” tabindex=”-1″ />
Just make a CSS rule for the elements you want that have outline:none;
Ok, somebody explained this to me. It’s a Mac problem. Mozilla is being true to operating system settings in Mac OS. There are two distinct ways around this on the user side. Both seem to work: In System Preferences → Keyboard, in the Shortcuts pane, check the “all controls” radio at the bottom. In Firefox, … Read more