Bug 25130 - onclick not fired for an element copied with cloneContents() or cloneNode()
Summary: onclick not fired for an element copied with cloneContents() or cloneNode()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexey Proskuryakov
URL: http://documenta.rudolphina.org/temp/...
Keywords:
: 29533 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-10 02:36 PDT by Mnafred Staudinger
Modified: 2019-02-06 09:02 PST (History)
8 users (show)

See Also:


Attachments
test case (504 bytes, application/xhtml+xml)
2009-04-10 09:24 PDT, Alexey Proskuryakov
no flags Details
proposed fix (50.30 KB, patch)
2009-09-24 16:36 PDT, Alexey Proskuryakov
no flags Details | Formatted Diff | Diff
now with Windows build fix (53.55 KB, patch)
2009-09-28 18:55 PDT, Alexey Proskuryakov
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mnafred Staudinger 2009-04-10 02:36:59 PDT
If you click on the "Q" label (an anchor), the onclick="toggleInto(event, 'Index_Q_div')" starts a javascript to retrieve a list of names and insert them into the document. On each name there is again an onclick="toggleInto(event, 'uniqueId')" specified, but now the javascript does _not_ get control and the content gets displayed on a separate page. It works as expected in Firefox 3.0.8 and Opera 9.64.
Comment 1 Alexey Proskuryakov 2009-04-10 09:24:46 PDT
Created attachment 29391 [details]
test case
Comment 2 Alexey Proskuryakov 2009-04-10 09:25:13 PDT
See also: bug 23318.
Comment 3 Alexey Proskuryakov 2009-09-22 09:44:31 PDT
*** Bug 29533 has been marked as a duplicate of this bug. ***
Comment 4 Alexey Proskuryakov 2009-09-24 16:36:09 PDT
Created attachment 40092 [details]
proposed fix
Comment 5 Alexey Proskuryakov 2009-09-24 16:38:43 PDT
CC'ing Adam, since this slightly touches XSSAuditor, and could be security sensitive in general.
Comment 6 Adam Barth 2009-09-24 16:48:51 PDT
This patch appears to largely undo a recent patch by Sam.  Maybe I'm confusing two things.
Comment 7 Sam Weinig 2009-09-24 17:56:41 PDT
(In reply to comment #6)
> This patch appears to largely undo a recent patch by Sam.  Maybe I'm confusing
> two things.

This isn't actually touching the same code, I added global objects to some other callback objects, but it is a very similar case.  I need to think about when/if passing the scriptExecutionContext() won't work where storing a globalObject would.
Comment 8 Sam Weinig 2009-09-25 13:15:39 PDT
(In reply to comment #7)
> (In reply to comment #6)
> > This patch appears to largely undo a recent patch by Sam.  Maybe I'm confusing
> > two things.
> 
> This isn't actually touching the same code, I added global objects to some
> other callback objects, but it is a very similar case.  I need to think about
> when/if passing the scriptExecutionContext() won't work where storing a
> globalObject would.

After thinking this over, I think this is the right direction to go and we should convert our other callback objects to use the same technique. r=me as well.
Comment 9 Alexey Proskuryakov 2009-09-25 13:45:17 PDT
Committed revision 48767.
Comment 10 Alexey Proskuryakov 2009-09-25 17:22:58 PDT
Fix reverted in r48778, because it broke Windows build, and we don't yet know how to fix it.
Comment 11 Eric Seidel (no email) 2009-09-26 01:33:37 PDT
Comment on attachment 40092 [details]
proposed fix

Sad.  Marking r- since this was reverted.  Hopefully a fix can be found soon! :)
Comment 12 Pavel Feldman 2009-09-27 02:45:54 PDT
WebCore/ChangeLog has been corrupted while reverting. Restored.

Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
Committed r48800
Comment 13 Alexey Proskuryakov 2009-09-28 18:55:55 PDT
Created attachment 40278 [details]
now with Windows build fix
Comment 14 Alexey Proskuryakov 2009-09-29 11:05:32 PDT
Committed revision 48884.
Comment 15 Alexey Proskuryakov 2009-09-29 11:40:08 PDT
Build fix in r48887.
Comment 16 Lucas Forschler 2019-02-06 09:02:43 PST
Mass moving XML DOM bugs to the "DOM" Component.