Opened 15 years ago
Closed 15 years ago
#2931 closed bug (fixed)
[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 (3)
Changed 15 years ago by
Attachment: | jquery.validate.fixorder.patch added |
---|
comment:1 Changed 15 years ago by
Owner: | set to joern |
---|
comment:2 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in [5691], applied both the :input fix for ordering and the :image exclusion.
fixes form element selector to get elements in order