question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

spellcheck=false attribute can't be set

See original GitHub issue

Looks like preact is replacing any value for spellcheck with true.

So when I’m doing

class TextBox extends Component {
	render({ title, ph, value }) {
		return (<div class="form-group">
				<label for={ Util.mangle(title) }>{ title }</label>
				<input type="text" 
					id={ Util.mangle(title) } class="form-control" 
					placeholder={ ph } value={ value } 
					spellcheck="false" />
			</div>);
	}
}

it renders an element with spellcheck="true"

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
developitcommented, Jan 4, 2017

awesome! Just for other who find this issue as well, you can also work with the spellcheck string attribute (rather than the property) by intentionally triggering a case mismatch in the prop name: <input spellCheck="false"> - this will trick Preact into diffing against the attribute instead of the property.

3reactions
golineycommented, Dec 20, 2017

<input spellcheck={false} /> doesn’t work for me, but camelcase does (<input spellCheck="false" />)

Thanks, @wilsonpage

Read more comments on GitHub >

github_iconTop Results From Across the Web

spellcheck=false on contentEditable elements - Stack Overflow
The problem is, when you set the spellcheck attribute to false, any words that were underlined for spelling mistakes will keep this ...
Read more >
spellcheck - HTML: HyperText Markup Language | MDN
If this attribute is not set, its default value is element-type and browser-defined. This default value may also be inherited, which means that ......
Read more >
spellcheck Attribute - David Walsh Blog
The HTML. The spellcheck attribute uses values of true or false (you cannot simply add the spellcheck attribute to a given element): <!...
Read more >
How to Spellcheck user input with just HTML! - YouTube
... learn about spellchecking with HTML and how you can hint the users' browser to spellcheck user input with a spellcheck attribute o......
Read more >
HTML Global spellcheck Attribute - W3Schools
The spellcheck attribute specifies whether the element is to have its spelling and grammar checked or not. The following can be spellchecked:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found