Bug 195192 - QMissing .specified property on DOM Attr element breaks jQuery 1.3.2
Summary: QMissing .specified property on DOM Attr element breaks jQuery 1.3.2
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-04 11:46 UTC by Diederik van der Boor
Modified: 2009-08-16 18:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Diederik van der Boor 2009-06-04 11:46:41 UTC
Version:           4.2.3 (KDE 4.2.3) "release 116" (using 4.2.3 (KDE 4.2.3) "release 116", KDE:KDE4:Factory:Desktop / openSUSE_11.0)
Compiler:          gcc
OS:                Linux (i686) release 2.6.25.20-0.1-default

Konqueror 3 and 4 don't implement the 'specified' attribute for the "Attr" element. The definition can be found here: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-637646024

This breaks jQuery 1.3.2, which relies on this attribute to retrieve the value of an <option> element. Because KHTML doesn't have this attribute, the jQuery functions val() and serialize() can't properly convert an HTML form to "postdata" string for submission over Ajax.

Bug for jQuery is reported here: http://dev.jquery.com/ticket/4725
Comment 1 Maksim Orlovich 2009-06-04 16:31:09 UTC
Thanks for the report... I think it's rather looking for a [[Get]] on a NamedNodeMap. (Why would one ever use that rather than hasAttribute? 
FYI, using Attr nodes bloats up memory use both for us and webcore).
Comment 2 Maksim Orlovich 2009-06-21 00:38:48 UTC
Hi... I am about to commit something that may fix this; do you have a testcase I can try to see if it addresses the issue?
Comment 3 Maksim Orlovich 2009-06-21 00:40:56 UTC
SVN commit 984521 by orlovich:

Add [[Get]] on NamedNodeMap

BUG:196409
CCBUG:195192


 M  +5 -0      kjs_dom.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=984521
Comment 4 Diederik van der Boor 2009-06-28 21:03:49 UTC
Sorry, I don't have a test case.

It wouldn't be too hard to code it, these would be the key points:
- a <form id="test">
- a <select name="sel" id="selField"> tag.
- alert( $("form#test").serialize() );
- alert( $("#selField").val() );
Comment 5 Emil Sedgh 2009-08-16 18:50:07 UTC
seems fine on trunk.
Comment 6 Maksim Orlovich 2009-08-16 18:55:32 UTC
Thanks