Side navigation
#6391 closed bug (duplicate)
Opened April 02, 2010 11:13AM UTC
Closed February 13, 2011 01:48AM UTC
Last modified February 13, 2011 01:48AM UTC
wrap() bug when wrap javascript
Reported by: | Colir | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | manipulation | Version: | 1.4.2 |
Keywords: | wrap script | Cc: | |
Blocked by: | Blocking: |
Description
the "wrap()" method re-execute script if the function wrap a div with javascript script
ex: i have javascript in my footer div.
if i wrap my main div ( wich contain div header, main and footer),
the script in my footer div will be fired twice
Attachments (1)
Change History (6)
Changed June 12, 2010 02:54AM UTC by comment:1
component: | unfiled → manipulation |
---|
Changed September 15, 2010 04:55PM UTC by comment:2
Please review the attached zip file which contains a simple html page that reproduces the issue. It would be great if this got fixed for the next point release.
Changed October 23, 2010 09:37PM UTC by comment:3
keywords: | wrap() → wrap script |
---|---|
milestone: | 1.4.3 → 1.5 |
priority: | → low |
status: | new → open |
I'm not entirely sure that this is fixable. In order to wrap the elements, they have to be momentarily taken out of the dom, and then placed back in. When you inject a script element into the dom, it executes. Perhaps we could play with finding any script elements and removing them entirely before a wrap inject back into the dom. Another option could be to change it's type
attribute to something invalid, as to not force an execution. This may be better since it would keep sibling logic consistent, etc...
For now, for those of you having a problem. Just remove the script tag before you wrap the footer. It doesn't have to live in the dom for the code that was in it to keep working... (unless it hasn't run yet).
Changed February 13, 2011 01:48AM UTC by comment:4
milestone: | → 1.next |
---|---|
resolution: | → duplicate |
status: | open → closed |