You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I insert a new div before an editable div, preact throws an error. When clicking the button in this example:
classTestContentEditableextendsComponent{constructor(props){super(props)this.state={inserted: false}this.insert=()=>{this.setState({inserted: true})}}render(){if(this.state.inserted){// => this will insert a new div before the editable div, this gives an errorreturn<div><div>not editable?</div><divcontentEditable="true">edit here...</div></div>}else{return<div><divcontentEditable="true">edit here...</div><buttononClick={this.insert}>Insert div before editable div</button></div>}}}
This throws the following error in Chrome:
preact.js:158 Uncaught SyntaxError: Failed to set the 'contentEditable' property on
'HTMLElement': The value provided ('null') is not one of 'true', 'false',
'plaintext-only', or 'inherit'.
Oh wow, that's awesome! Thanks for the issue report anyway, I'll try to add a test for this so that future changes to this stuff don't break your use-case. Cheers!
When I insert a new div before an editable div, preact throws an error. When clicking the button in this example:
This throws the following error in Chrome:
See also this similar
virtual-dom
issue: Matt-Esch/virtual-dom#176The text was updated successfully, but these errors were encountered: