Closed Bug 318407 Opened 16 years ago Closed 15 years ago

onchange event of preference elements gets called twice

Categories

(Toolkit :: Preferences, defect)

1.8 Branch
defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.8.1

People

(Reporter: mossop, Assigned: mossop)

Details

(Keywords: fixed1.8.1)

Attachments

(1 file)

The code in the onchange attribute of a preference element will get called twice, with different values for the "this" variable.

This is a problem if extension authors try to use "this" to refer to that preference in their code.
It appears that dispatchEvent calls the onchange code anyway, and it calls it with the this variable correctly set to the preference element.
Assignee: nobody → mossop
Status: NEW → ASSIGNED
Attachment #204597 - Flags: first-review?(bugs.mano)
Comment on attachment 204597 [details] [diff] [review]
dispatchEvent calls onchange anyway

Been waiting for this for a bit and Mano mentioned your queue was a bit quiet the last time I say him!
Attachment #204597 - Flags: first-review?(bugs.mano) → first-review?(mconnor)
Comment on attachment 204597 [details] [diff] [review]
dispatchEvent calls onchange anyway

He lies!
Attachment #204597 - Flags: first-review?(mconnor) → first-review+
Checked in by hwaara
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Attachment #204597 - Flags: approval-branch-1.8.1?
Attachment #204597 - Flags: approval-branch-1.8.1? → approval-branch-1.8.1?(mconnor)
Attachment #204597 - Flags: approval-branch-1.8.1?(mconnor) → approval-branch-1.8.1+
mozilla/toolkit/content/widgets/preferences.xml; new revision: 1.31.2.12;
Keywords: fixed1.8.1
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → mozilla1.8.1
You need to log in before you can comment on or make changes to this bug.