Use the "placeholder" attribute on the "input" tag
See original GitHub issueThere are a few nasty UI conflicts because the greyed out “Search by topic…” placeholder
behavior is implemented by controlling the input field’s value
attribute.
To reproduce:
- Enter some text (e.g.
runtime
). - Select a topic bubble (e.g.
runtime
). - Dismiss the topic bubble.
- Start typing again.
2 issues seen. In both the following screenshots, I typed runtime
again once the topic bubble had been dismissed.
- The text is just appended to the placeholder.
- The placeholder disappears, but so does the start of the next text you type. Here it got as far as showing
Search by topic...ru
before the text was cleared, leaving only thentime
ofruntime
.
The input
tag used for search should be showing Search by topic...
as a placeholder
attribute, not the value
attribute.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
HTML placeholder Attribute - W3Schools
The placeholder attribute specifies a short hint that describes the expected value of a input field / textarea. The short hint is displayed...
Read more >HTML | placeholder Attribute - GeeksforGeeks
The placeholder attribute specifies a short hint that describes the expected value of an input field/text area. The short hint is displayed ...
Read more >Don't Use The Placeholder Attribute - Smashing Magazine
Introduced as part of the HTML5 specification, the placeholder attribute “represents a short hint (a word or short phrase) intended to aid ...
Read more >HTML placeholder Attribute - Dofactory
The placeholder attribute adds a hint to an input element. The hint appears as muted text inside the control and specifies what data...
Read more >How to use placeholder attribute in HTML? - Tutorialspoint
If you want to set a hint for text area or input field, then use the HTML placeholder attribute. The hint is the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
not anymore. you’ve earned the 🔑s
Yeah, works much better. Nice work.
I think we should fix up the CSS before we release though. Seems the CSS from the old chosen library was just copied wholesale into our home.css and there isn’t a proper match now. Should mostly be some overrides for the bubble sizes and backgrounds, and the chooser line height.
@alaframboise might have some insight here, but it was so long ago I wouldn’t be surprised if that information has been flushed.
Cheers,
Nick.