Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Component loaded on a hidden iframe throws an error on Firefox #88

Open
1 of 8 tasks
jarrodek opened this issue May 5, 2018 · 0 comments
Open
1 of 8 tasks

Component loaded on a hidden iframe throws an error on Firefox #88

jarrodek opened this issue May 5, 2018 · 0 comments

Comments

@jarrodek
Copy link

jarrodek commented May 5, 2018

Description

I have a page that uses paper dropdowns and paper dialog.
The page is loaded as an iframe on another page.
Initially the iframe is hidden on the top page.

With this scenario, FireFox throws an error:

TypeError: window.getComputedStyle(...) is null

on line 220, which is:

this._isRTL = window.getComputedStyle(this).direction == 'rtl';

Apparently, under FF, window.getComputedStyle(this) returns null when the component is rendered in hidden iframe.

Expected outcome

No error :)

Actual outcome

Error thrown in connectedCallback causes the element to stop rendering.

Live Demo

Don't have any.

Steps to reproduce

  1. Create a simple page that uses an element that implements IronFitBehavior
  2. Embed the page on another page:
<section id="main" hidden>
      <iframe allowfullscreen="0" src="http://127.0.0.1:8000/components/chat-app/" height="450" frameborder="0" width="840"></iframe>
</section>
  1. Open the iframe page

Browsers Affected

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10
@jarrodek jarrodek changed the title Component loaded on an iframe and hidden throws an error on Firefox Component loaded on a hidden iframe throws an error on Firefox May 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant