WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
33194
REGRESSION(
r48566
): typeof form element group returns "function", causing a regression
https://bugs.webkit.org/show_bug.cgi?id=33194
Summary
REGRESSION(r48566): typeof form element group returns "function", causing a r...
Brian Campbell
Reported
2010-01-04 20:36:08 PST
Created
attachment 45859
[details]
Example of behavior, displays "object" in Safari 4.0.4, but "function" in WebKit nightly In Safari 4.0.4, getting a form element group via document.forms[0].somename gives you a collection that returns "object" when you call typeof on it. In the latest WebKit nightly (
r52686
), it returns "function". This behavior is discussed in
bug 14547
, but it did not previously apply to the collections retrieved by accessing a form element group. This has caused a regression on the following page:
https://nhworksjobmatch.nhes.nh.gov/regstep1of3.asp?rt=ind
. Once you click past the privacy agreement, you get a registration form, with some radio buttons near the bottom. If you fill out the form and click "next", it runs some validation code, which results in an assertion failure, as it tries to check that the form element of the given name has a typeof "object", when in WebKit it has a typeof "function": // Get an object reference to the HTML control obj = eval("document.forms[" + ary[counter].FormIndex + "]." + ary[counter].ControlName); } // Did it eval? if (typeof(obj) != "object") { alert("Developer Error: document.forms[" + ary[counter].FormIndex + "]." + ary[counter].ControlName + " did not evaluate to a valid object!"); return false; } A fix for this problem, to allow NodeLists to be callable but have type "object", has been discussed in
bug 14547
, but does not appear to be implemented.
Attachments
Example of behavior, displays "object" in Safari 4.0.4, but "function" in WebKit nightly
(221 bytes, text/html)
2010-01-04 20:36 PST
,
Brian Campbell
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2010-01-05 11:43:07 PST
Apparently broken in
bug 29519
.
Sam Weinig
Comment 2
2010-01-05 11:46:13 PST
<
rdar://problem/7511507
>
Ahmad Saleem
Comment 3
2022-08-09 15:24:21 PDT
I am unable to reproduce this bug in Safari 15.6 on macOS 12.5 and it show this as "object" and it is matching with other browsers (Chrome Canary 106 and Firefox Nightly 105). I think it was fixed along the way, I am going to mark this as "RESOLVED CONFIGURATION CHANGED". If it is still reproducible, please reopen while sharing updated test case. Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug