Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

When I edit my post and update, I edit a textarea and hit a Tab key, then Update button will be activated and press Enter to admit the change.

But in another environment if I press tab, then preview button is activated.

Why is this difference of tab order happens? And which tab order is right?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Form fields have something called a tab index. So when you press the tab key it will know where to go next. However when a page has multiple forms the indexes can get mixed up, unless they are clearly specified in each field.

Some wp form plugins give you the ability to add the form index range, that way if there are multiple form elements in one page they won't overlap.

So to answer your question... the tab order will change from page to page depending on the form elements in it.

Here's some more reading on tab index.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.