Modify ↓
Ticket #4725 (closed bug: duplicate)
serialize() and val() returns the option title for <select> fields in Konqueror 3 and 4
| Reported by: | vdboor | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4 |
| Component: | core | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
When running $(form).serialize(), the <select> fields are not processed correctly. Instead of returning the value of the field, the title of the current option is returned.
This happens both in Konqueror 3 and 4.
When reading the value with the normal DOM API (select.value or select.options[ select.selectedIndex ].value) the proper value does get returned.
If this issue is also caused by a bug in Konqueror, I'd like to report this to bugs.kde.org too.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Digged a little deeper, it turns out the .specified field does not exist in Konqueror. This causes the following line to fail:
return (elem.attributes.value || {}).specified ? elem.value : elem.text;
Bug for Konqueror is reported here: https://bugs.kde.org/show_bug.cgi?id=195192
I guess the fix for jQuery would be testing for .specified !== false...?