Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

element.getComputedStyle returns null in Firefox iFrame with display:none #1669

@drewjenkins

Description

@drewjenkins

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
When DraftJS calls getLineHeightPx in expandRangeToStartOfLine.js, it uses getComputedStyle, which in Firefox potentially returns null, due to a documented Firefox issue found here https://bugzilla.mozilla.org/show_bug.cgi?id=548397

What is the expected behavior?
Don't assume getComputedStyle will return an object.

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
All Firefox

This is a pretty severe bug in our app, since DraftJS is the main place the enduser does their input. We can work around it now by doing what was suggested here https://bugzilla.mozilla.org/show_bug.cgi?id=548397#c8 but it is a pretty hacky workaround

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions