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.

Use the "placeholder" attribute on the "input" tag

See original GitHub issue

There 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:

  1. Enter some text (e.g. runtime).
  2. Select a topic bubble (e.g. runtime).
  3. Dismiss the topic bubble.
  4. Start typing again.

2 issues seen. In both the following screenshots, I typed runtime again once the topic bubble had been dismissed.

  1. The text is just appended to the placeholder.

unknown

  1. 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 the ntime of runtime.

unknown-1

The input tag used for search should be showing Search by topic... as a placeholder attribute, not the value attribute.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jgravoiscommented, Apr 17, 2017

I must be a foreigner in this repo.

not anymore. you’ve earned the 🔑s

1reaction
nixtacommented, Apr 17, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

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