compiler icon indicating copy to clipboard operation
compiler copied to clipboard

Adding type_ attribute to textarea throws error in runtime

Open hariroshan opened this issue 3 years ago • 3 comments

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"  
        ]
        []

  • Elm: 0.19.1
  • Browser: Microsoft Edge Version 98.0.1108.56 (Official build) (x86_64)
  • Operating System: mac OS Catalina 10.15.7

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)

hariroshan avatar Mar 01 '22 12:03 hariroshan

Thanks for reporting this! To set expectations:

  • Issues are reviewed in batches, so it can take some time to get a response.
  • Ask questions in a community forum. You will get an answer quicker that way!
  • If you experience something similar, open a new issue. We like duplicates.

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

github-actions[bot] avatar Mar 01 '22 12:03 github-actions[bot]

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

  • Elm: 0.19.1-5
  • Browser: Chrome beta 99.0.4844.51
  • Operating System: Ubuntu 21.10

laurentpayot avatar Mar 02 '22 07:03 laurentpayot

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

jfmengels avatar Apr 12 '22 19:04 jfmengels