mweiss / elm-rte-toolkit

A toolkit for creating rich text editors in Elm
https://mweiss.github.io/elm-rte-toolkit/
BSD 3-Clause "New" or "Revised" License
149 stars 14 forks source link

Fix issue on demo page with dark reader #21

Closed mweiss closed 4 years ago

mweiss commented 4 years ago

See #20 and https://discourse.elm-lang.org/t/runtime-errors-caused-by-chrome-extensions/4381?u=mweiss

The demo page uses font-awesome, which inserts a style element in the beginning of the body. However, dark reader, a chrome and firefox extension, will then insert its own style element after it for its own purposes and logic. This confuses Elm's virtual dom, which just crashes and doesn't recover. This is a workaround to wrap the styles in a div so even though its own of sync, because it never changes position in the app, it'll end up working.