Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.
This repository was 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

@jarrodek

Description

@jarrodek

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions