Setting innerhtml causes error

using contenteditable h1 tag, I have been able to make a "notecard" which you can edit and the content of which is bound to a signal. onFocusOut causes the following function to run
(e) =>{
setText(e.currentTarget.innerText || "")}
(e) =>{
setText(e.currentTarget.innerText || "")}
. I have tried many ways to make sure that the inner text is not null, yet i am still getting this error. Any tips would be much appreciated
6 Replies
bigmistqke
bigmistqke16mo ago
do you still need help or did you figure it out?
romanobro
romanobro16mo ago
i figured a workaround recently but I believe that it might be a bug. I apologize, as I dont know enough about frameworks to open an issue on github. When i tried to replicate it in plain solid js rather than solid start, it worked just fine so I think this is a solid start issue
bigmistqke
bigmistqke16mo ago
Very interesting. If it's inconsistent with 'regular' solid, i would still post an issue at https://github.com/solidjs/solid-start
GitHub
GitHub - solidjs/solid-start: SolidStart, the Solid app framework
SolidStart, the Solid app framework. Contribute to solidjs/solid-start development by creating an account on GitHub.
bigmistqke
bigmistqke16mo ago
Solid start s still in beta, so bugs are to be expected.
romanobro
romanobro16mo ago
okay, thank you
bigmistqke
bigmistqke16mo ago
Ur welcome! A codesandbox of the buggy solidstart code would probably be helpful. (just figured out myself how easy it is to upload a project to codesandbox; just install it npm install -g codesandbox and then in the root of ur directory codesandbox .)
Want results from more Discord servers?
Add your server
More Posts