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.

md error: long error messages overlap input fields

See original GitHub issue

Bug, feature request, or proposal:

Bug (or question about) displaying long error messages in md-error

What is the expected behavior?

The error message needs to be visible without overlapping with other input fields

What is the current behavior?

If there are multiple error messages or if a message is too long it is displayed on top of the next input field

What are the steps to reproduce?

The plunk displays an example of a long error message for Last name, which is required, overlapping Email input field and ‘Save’ button on blur event: http://plnkr.co/edit/LX2iSTxWPJOvNVl0pzy8

What is the use-case or motivation for changing an existing behavior?

Long error messages in input form need to be displayed correctly

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

±- @angular/animations@4.1.2 ±- @angular/cli@1.0.3 ±- UNMET PEER DEPENDENCY @angular/common@4.1.2 ±- @angular/compiler@4.1.2 ±- @angular/compiler-cli@4.1.2 | ±- @angular/tsc-wrapped@4.1.2 ±- UNMET PEER DEPENDENCY @angular/core@4.1.2 ±- @angular/flex-layout@2.0.0-beta.8 ±- @angular/forms@4.1.2 ±- @angular/http@4.1.2 ±- @angular/material@2.0.0-beta.5 ±- @angular/platform-browser@4.1.2 ±- @angular/platform-browser-dynamic@4.1.2 ±- @angular/router@4.1.2 | ±- @angular/core@2.4.10

| ±- typescript@2.2.2 | `-- typescript@1.8.10 ±- typescript@2.3.2

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:31
  • Comments:33 (3 by maintainers)

github_iconTop GitHub Comments

45reactions
blyndcidecommented, May 4, 2018

For 6.0.0 I needed to change @xumepadismal workaround to:

mat-form-field .mat-form-field {
  &-underline {
    position: static;
  }
  &-subscript-wrapper {
    position: static;
  }
}

If there are problems let me know.

39reactions
xumepadismalcommented, Oct 31, 2017

And here is my workaround for now (in my styles.scss):

// Workaround for https://github.com/angular/material2/issues/4580.
mat-form-field .mat-form-field {
  &-underline {
    position: relative;
    bottom: auto;
  }
  &-subscript-wrapper {
    position: static;
  }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error messages overlap the input fields - WordPress.org
Hello. When the user doesn't fill in correctly the required field, the error message (class wpcf7-not-valid-tip) overlaps the whole input field and ...
Read more >
Angular Material 2: Fix for Multiline Error messages
The problem is that the element with class .mat-form-field-subscript-wrapper is position: absolute , so it's not occupying real space.
Read more >
Long Label overlapping Input - Material Design for Bootstrap
Because when the label is too long it starts overlapping the input. Image of the Long Label. Image of the overlapped Input. Code:...
Read more >
Angular Material 2: Fix For Multiline Error Messages - ADocLib
The error message needs to be visible without overlapping with other input If there are multiple error messages or if a message is...
Read more >
Input validation error overlaps with another and falls off screen
There's something after the input that's causing the message to go down - try and find what it is and remove it ·...
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