Closed Bug 467757 Opened 16 years ago Closed 12 years ago

canonical.com - broken in Gecko 1.9.1, needs to use newly-implemented querySelector(all)

Categories

(Tech Evangelism Graveyard :: English Other, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: asac, Unassigned)

References

()

Details

This is from https://bugs.launchpad.net/bugs/304221. I am not really confident that this is the right component, but hope its a good place to start :).

Using Jaunty with Firefox 3.1 (Dec 1)

Steps to reproduce (try in FF3.0 and FF3.1)
1. Try to apply for Canonical Job Posting
Quick Link: http://www.canonical.com/contact/recruitment?tfa_RoleID=a0A200000031kVc
2. Try to set option in CV/Résumé section.
3. Notice no box in FF3.1 and a box in FF3.0

While loading page the following error happens on 3.1 (b2 and b3pre) while not on 3.0
Error: f.querySelectorAll(wFORMS.behaviors.hint.HINT_SELECTOR).forEach is not a function
Source File: http://app.formassembly.com/wForms/3.0/js/wforms.js
Line: 3326
Does it work if you disable jit via about:config ?
I haven't read any of the target site's code, but when has that stopped anyone?

The native querySelectorAll returns a NodeList or StaticNodeList, don't remember which.  If this worked in 3.0, something must have implemented its own qsa and probably returned an array.  That array would have had that method.  Unless forEach was added to (Static)?NodeList, the method wouldn't be on the object returned by qsa.  I highly suspect this is Tech Evang.

As for a fix, using Array.prototype.forEach(f.qsa(...), functionPassedToForEach) is probably what's wanted if the above Slashdot-esque analysis is correct.
Original reporter here, I went back and tried old builds and the issue was introduced with the "2008-07-22-02-mozilla-central" build.
Mon Jul 21 17:56:19 2008 -0700	0d7377e810b3	Boris Zbarsky — Bug 416317. Implement querySelector(All) API. r=dbaron, sr=jst

The bug appeared immediately (or else very close to it, which I doubt) after qsa was implemented, so this is Tech Evangelism.  The site code needs to be changed per my suggestion in comment 3.
Assignee: general → english-other
Component: JavaScript Engine → English Other
OS: Linux → All
Product: Core → Tech Evangelism
QA Contact: general → english-other
Hardware: PC → All
Summary: script error on 3.1, but not on 3.0 → canonical.com - broken in Gecko 1.9.1, needs to use newly-implemented querySelector(all)
I sent some mail to webmaster@canonical.com pointing them at the suggestion in comment 3.
Yeah.  They're probably using an old buggy version of prototype, which had a bogus non-forward-compatible querySelectorAll implementation.
This can be closed, they use a different system for resumes than they did then. 
(I'm the original reporter)
Thanks for your comment, marking fixed
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.