Open
Bug 347079
Opened 19 years ago
Updated 1 year ago
JS window.open, DOM Model: (window.open()).document.body.style.padding=.. not working
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
UNCONFIRMED
People
(Reporter: fixxxerrr, Unassigned)
Details
Attachments
(1 obsolete file)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5
when I try to change document.body.style.padding using the variable returned by window.open() to access the dom model of a newly opened window, nothing changes.
Reproducible: Always
Steps to Reproduce:
<script>
function a() {
w = window.open('2.html','foo','width=110,height=110');
w.document.body.style.margin='0px';
}
</script>
<a href="javascript:a()">a</a>
Actual Results:
padding does not change
Expected Results:
padding should change
this code works in IE6 and Opera 9. :)
Updated•19 years ago
|
Assignee: nobody → general
Component: General → DOM
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → 1.8 Branch
Comment 2•19 years ago
|
||
Is this a timing issue -- does it work if you use setTimeout?
I don't think it's reasonable for you to expect 2.html to have started loading in the new window by the time window.open() returns. I'm surprised this works in other browsers.
yes it works with setTimeout, that's what i used as a workaround here.
Updated•16 years ago
|
Assignee: general → nobody
QA Contact: ian → general
Updated•14 years ago
|
Summary: JS window.open, DOM Model: (window.open()).document.style.padding=.. not working → JS window.open, DOM Model: (window.open()).document.body.style.padding=.. not working
Comment 4•7 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
| Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•3 years ago
|
Severity: normal → S3
Updated•1 year ago
|
Attachment #9386598 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•