Closed Bug 311006 Opened 19 years ago Closed 19 years ago

Events don't fire after importNode/appendChild from a XUL document into HTML document

Categories

(Core :: DOM: Core & HTML, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: andrew, Assigned: peterv)

Details

(Keywords: testcase)

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20050901 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20050901 Firefox/1.6a1

When Javascript is used to import a button element from a XUL document and
append it into a form in a HTML document, the onclick event does not fire unless
you cause the original button to fire an event first(see the testcase).

Reproducible: Always

Steps to Reproduce:
1. Place test-clonebug.xul and test-clonebug=frame.html in the same directory.
2. Load test-clonebug.html
3. Click on the second button(the one imported into the form in the iframe).
4. Click on the first button(the original).
5. Click on the second button again.
Actual Results:  
No alert appeared at step 3.
An alert appeared at step 5.

Expected Results:  
An alert should have appeared at both steps 3 and 5.
Attached file Testcase
Confirmed.
Assignee: nobody → general
Status: UNCONFIRMED → NEW
Component: General → DOM: Core
Ever confirmed: true
Keywords: testcase
OS: Linux → All
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
Attached patch v1Splinter Review
It should be ok to have a XUL element with a prototype but not in a XUL
document (and so without a path to the prototype document), no?
Assignee: general → peterv
Status: NEW → ASSIGNED
Attachment #198438 - Flags: superreview?(bzbarsky)
Attachment #198438 - Flags: review?(bzbarsky)
Comment on attachment 198438 [details] [diff] [review]
v1

Yeah, that looks good.
Attachment #198438 - Flags: superreview?(bzbarsky)
Attachment #198438 - Flags: superreview+
Attachment #198438 - Flags: review?(bzbarsky)
Attachment #198438 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Component: DOM: Core → DOM: Core & HTML
QA Contact: ian → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: