Opened 10 years ago

Closed 10 years ago

#8880 closed defect (worksforme)

dojo.getComputedStyle doesn't within iframe in Opera

Reported by: coldwind Owned by: anonymous
Priority: high Milestone: 1.4
Component: Core Version: 1.2.3
Keywords: Cc:
Blocked By: Blocking:

Description

I create div elemenet in iframe with dojo.withDoc. Then I try to get computed styles. In FF it works but in Opera does not, cause:

HTMLElement != iframe.contentWindow.HTMLElement

I attached test file. If you open it in FF it will display [object ComputedCSSStyleDeclaration] in iframe; however if you open it in Opera it will display [object Object] (and it will be empty object).

As a result of this bug dijit.Editor doesn't work in Opera when it placed in iframe.

Attachments (1)

test.html (642 bytes) - added by coldwind 10 years ago.
HTML document for testing this bug

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by coldwind

Attachment: test.html added

HTML document for testing this bug

comment:1 Changed 10 years ago by bill

Milestone: tbd1.4

1.3rc1 has been release; bumping remaining tickets to 1.4 (except for documentation/testing tickets)

comment:2 Changed 10 years ago by Adam Peller

does this still fail in the latest Opera?

comment:3 Changed 10 years ago by strife25

This still does not work in the latest version of Opera, but output has changed in Opera to:

[object CSSStyleDeclaration]

instead of FF's:

[object ComputedCSSStyleDeclaration]

comment:4 Changed 10 years ago by bill

Summary: dojo.getComputedStyle doesn't within iframe in Opera 9.64dojo.getComputedStyle doesn't within iframe in Opera

comment:5 Changed 10 years ago by strife25

I've looked into this bug a little bit more and it seems that Opera is working correctly. There are some inconsistencies with Opera's getComputedStyle vs. FF's implementation, but acquiring the computed style values (for example, a width in px is returned instead of %), works as expected.

We receive the same object from Opera ([object CSSSTyleDeclaration]) when I try using currentStyle instead of document.defaultView.getcomputedStyle

I also tested dijit.Editor in an iframe and everything works fine in the latest Opera.

comment:6 Changed 10 years ago by Adam Peller

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.