#existence of textarea causes later div in JSX to throw a runtime error

67 messages · Page 1 of 1 (latest)

crystal fractal
#

hmm

#

what if you delete the textarea

#

hmmm

#

restarting vite server and ts server does nothing?

#

clearing cache

#

The only thing I can think of that could be causing this is where the component is placed

#

oof

#

I can't seem to replicate it in my own project

#

is this solid-start?

#

I have no clue, unless you can reproduce it in a playground

#

Must be something else

#

I guess not, I tried it

#

are all the classes already defined?

#

what if you remove the div that's surrounding the textarea

#

hmmm

#

okay what if you give the textarea the entry class

#

same

#

HUH

#

what about just a string for the class

#

just like valve it doesn't like 3

#

okay so my guess is it has something to do with the css modules????

#

what about string class on just the div that surrounds the text area

#

no error 👀

#

WHAT

#

🤣

#

are you on 1.7?

#

okay he did change something regarding closing tags from what I read but idk if that would cause an issue

#

can you inspect that one and see what the html looks like

#

👀

#

Yeah this is definitely a bug, but I can't tell if it's a 1.7 bug or

#

Looks like a 1.7 bug

#

try this fix

#

from ryan

#

also worth deleting node_modules and reinstalling

#

🤞

#

hmm

#

might just be worth going down a version, since that update was only from an hour ago

#

but he does say you would get the latest if you fresh install 🤔

#

I saw that too

#

yeah

#

hmm

#

Was going to just add it to the issue

#

alright nice

#

at least you know you aren't going crazy

valid timber
#

Yeah this looks like the exact same pattern as the others

#

Basically if there is a parent sibling it somehow gets swallowed

#

Let me confirm

#

Yeah..

#

I wonder how many more there are

#

It's always the same pattern

#
<div>
  <div>
    <offending-element />
  </div>
  <div />
</div>
#

In this situation it is the last element in its hierarchy so it can be safe not to close, but for some elements, they basically still eat the following siblings. So the moment you add another div even at a parent level it gets consumed

#

Yeah it doesn't matter how many siblings there are. As long as the parent has siblings

#

I can just go ahead and release textarea.. but would love to brainstorm what other elements could be weird like that

#

So far it is a and table, all the text decorating ones like b, and now textarea.

#

textarea makes sense because of contenteditable

#

More ones that seem to care about the format of their children..like they modify them in some way

#

Maybe select might be an issue

#

like it looks for options

#

Yeah..

#

I do for the ones that make sense but there are over 100

#

I can test it pretty fast in the browser.. select if fine

#

because all I do is:
t = document.createElement("template");
t.innerHTML = <div><div><offending-element></div><div>

// t.innerHTML should equal <div><div><offending-element></offending-element></div><div></div></div>

#

actually select isn't good

#

I think with co-pilot automating it probably makes sense, but I need a browser env to do it.