Skip to main content

Bug Tracker

Side navigation

#2931 closed bug (fixed)

Opened May 24, 2008 12:41PM UTC

Closed May 25, 2008 11:36AM UTC

[validate] form elements not ordered

Reported by: adamschlag Owned by: joern
Priority: minor Milestone: 1.3
Component: plugin Version: 1.2.5
Keywords: validate Cc:
Blocked by: Blocking:
Description

I'm using the validate plugin for a project I'm working on, and during my testing I noticed that my first form element (a select) was not getting focus when it wasn't filled in, and instead the first invalid input element was focused instead. After digging in the validate code, I noticed that the form elements are selected with this selector:

filter("input, select, textarea")

Which, of course, selects all the input elements before any other element.

Updating the selector to:

filter(":input")

does the trick (at least for me...I've not tested it on anything but my own code). My patch also adds :image to the exclusion filter, since it wasn't there before.

Attachments (1)
Change History (2)

Changed May 24, 2008 08:54PM UTC by flesler comment:1

owner: → joern

Changed May 25, 2008 11:36AM UTC by joern comment:2

resolution: → fixed
status: newclosed

Fixed in [5691], applied both the :input fix for ordering and the :image exclusion.