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.

shouldPlaceholderFloat doesn't work

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Place holder should not float on focus.

What is the current behavior?

Placeholder floats on focus.

What are the steps to reproduce?

using master latest, this does not work to stop floating placeholder and it should based on docs:

<mat-form-field>
  <input matInput type="text" placeholder="Alias name" shouldPlaceholderFloat="false">
</mat-form-field>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Wykkscommented, Oct 31, 2017

Try with [shouldPlaceholderFloat]="false" Without [] you pass false as a string. Also, you should use floatPlaceholder from mat-form-field instead https://material.angular.io/components/form-field/overview#floating-placeholder

2reactions
dadasigncommented, Mar 30, 2018

You can use floatLabel: FloatLabelType now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

floating label not working correctly with not(:placeholder-shown)
currently I'm implementing a simple floating label ...
Read more >
Floating labels are problematic. After writing Placeholders are…
They have poor contrast​​ Like placeholder text, floating labels have low contrast to differentiate it but low contrast text is hard-to-read. ...
Read more >
Don't Use The Placeholder Attribute - Smashing Magazine
This little trick provides an extra area for interacting with the input, which can be beneficial to people with motor control issues.
Read more >
The Anatomy of Accessible Forms - Deque Systems
According to the research conducted by Nielsen, it is not best practice to have a placeholder in the form field from a user...
Read more >
Material Design Style: Placeholder should float to top and not ...
When using the placeholder, the placeholder correctly floats to the top of the autocomplete, but then disappears once the value has been ...
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