If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

DOM javascript events stop working after DOM manipulation

VERIFIED DUPLICATE of bug 26528

Status

()

Core
DOM
P3
normal
VERIFIED DUPLICATE of bug 26528
17 years ago
17 years ago

People

(Reporter: Paul McGarry, Assigned: jst)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; m18) Gecko/20001117
BuildID:    2000111704

The attachment features a series of divs. When you click on a DIV, then another
DIV, the two DIVs swap positions (using node.cloneNode and then
parentnode.replaceChild calls).
This works once on Mozilla, but after the swap has occured once for a given DIV,
that DIV seems to stop reponding to (onMouseDown) events.


Reproducible: Always
Steps to Reproduce:
1) Load up attachment.
2) Click on div1
3) Click on div2
4) Click on div1
5) Click on div2

Actual Results:  Divs swap first time, but don't on the second time

Expected Results:  Divs should swap happily all day if you can be bothered to
keep clicking em.

Tested on WIN 2000111704 and Linux (one day older from buildbar).
I'm new to this DOM stuff so perhaps I'm missing something, but it works as
expected on IE5.5sp1.

Also if you click on the same div twice in a row (ie try and swap it with
itself) it will throw a JS exception, I've just left checking for that out to
keep the testcase simple.
(Reporter)

Comment 1

17 years ago
Created attachment 19491 [details]
HTML file that demonstrates problem
(Reporter)

Comment 2

17 years ago
Oh arse. This looks like a duplicate of bug 26528. How did I miss that before?
Sorry for the spam.
Yep, looks like a duplicate

*** This bug has been marked as a duplicate of 26528 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE

Updated

17 years ago
Status: RESOLVED → VERIFIED

Comment 4

17 years ago
vrfy dup
You need to log in before you can comment on or make changes to this bug.