-
Notifications
You must be signed in to change notification settings - Fork 1k
wysihtml5-0.4.0pre.js + textarea hidden + Firefox = TypeError: sel.nativeSelection is null #371
Comments
I also get this error in 0.3.0 |
Experiencing same issue on v0.4.0.pre |
Same issue here :( Any ideas on how to resolve it? |
For me, not hiding the textarea on page load fixed it. Just remove display:none; if it's there.
Sent from my iPhone On Fri, Sep 6, 2013 at 4:48 PM, Eric notifications@github.com wrote:
|
Thanks, that makes a bit more sense. I'll probably have to do a workaround like setting the opacity to hide the editor instead until there's a more permanent solution. |
I patched 1 line in rangy and it seems to fix the issue: https://github.com/glebm/bootstrap-wysihtml5-rails/blob/master/vendor/assets/javascripts/bootstrap-wysihtml5/rangy/rangy-core.js#L2958 |
I cannot thank you enough...that did the trick! High-five! ✋ |
I'm having the same issue. Using wysihtml5-0.4.0pre.js + Bootstrap tabs (which are hidding the textarea onload by applying a css class with display:none). Plus, I've set the option On Firefox I get the console error When I apply @glebm's fix it works almost fine (Cheers for that one! Saved me from a really embarrassing script I was about to write). Only now, in Firefox, the editors inside tabs stoped making paragraphs and return only Anyone else having the same problem? Edit: I'm also using bootstrap-wysihtml5 and I'm calling wysihtml5 after the tabs script. It's not very practical for me to change this order. Although I think that could fix it, I'd love to find a more permanent solution. |
This solution was provided by this issue tiff#371 but not implemented in this code, (it was implemented in the bootstrap version only https://github.com/glebm/bootstrap-wysihtml5-rails/blob/master/vendor/assets/javascripts/bootstrap-wysihtml5/rangy/rangy-core.js#L2958
I also get this error in 0.3.0 |
Hi,
I know wysihtml5-0.4.0pre.js is not a final version but for your information when using it with a hidden textarea (in a tab for example) on Firefox, you have a js error:
See example here: http://jsfiddle.net/EhbuY/
Thanks
The text was updated successfully, but these errors were encountered: