elm / compiler

Compiler for Elm, a functional language for reliable webapps.
https://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
7.48k stars 659 forks source link

Adding type_ attribute to textarea throws error in runtime #2245

Open hariroshan opened 2 years ago

hariroshan commented 2 years ago

Quick Summary: I know we are not suppose to add type_ attr to textarea. But It was not caught during compile time and crashes runtime when the code is reached.

SSCCE

textarea
        [  type_ "text" 
         , class "hello"  
        ]
        []

Additional Details

    Uncaught TypeError: Cannot set property type of #<HTMLTextAreaElement> which has only a getter
    at _VirtualDom_applyFacts (elm.js:2842:87)
    at _VirtualDom_render (elm.js:2809:2)
    at _VirtualDom_render (elm.js:2813:36)
    at _VirtualDom_render (elm.js:2813:36)
    at _VirtualDom_render (elm.js:2813:36)
    at _VirtualDom_render (elm.js:2813:36)
    at _VirtualDom_render (elm.js:2813:36)
    at _VirtualDom_render (elm.js:2786:17)
    at _VirtualDom_applyPatch (elm.js:3755:26)
    at _VirtualDom_applyPatchesHelp (elm.js:3702:17)
github-actions[bot] commented 2 years ago

Thanks for reporting this! To set expectations:

Finally, please be patient with the core team. They are trying their best with limited resources.

laurentpayot commented 2 years ago

I ran into this error yesterday too. It caused a loop in the browser and a continuous memory usage increase.

jfmengels commented 2 years ago

This issue is probably better reported in elm/virtual-dom.