You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.
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
The text was updated successfully, but these errors were encountered:
Thanks for the great info! Sounds like there could be an easy fix? Would you like to submit a PR?
Also for your awareness - If you are using Draft.js inside of an iframe I think there are other potential problems that you will encounter. It's worth taking a look at #765 and also facebook/react#12037
So while we're working towards full support of rendering inside iframes, there are some known issues with that use case.
selection is null in Firefox here when the iframe is display:none, so we get a type error here. Would you be willing to review a PR to default to an empty object if the browser returns null for the Selection?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When DraftJS calls
getLineHeightPx
inexpandRangeToStartOfLine.js
, it usesgetComputedStyle
, which in Firefox potentially returns null, due to a documented Firefox issue found here https://bugzilla.mozilla.org/show_bug.cgi?id=548397What 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
The text was updated successfully, but these errors were encountered: