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.

FormsModule: untouched text input is not pristine in IE 11

See original GitHub issue

I’m submitting a … (check one with “x”)

[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior When showing a form in IE 11 with an input field, the initial state of the field is not pristine, leading to error messages being shown to the user before he touched the field.

Expected behavior The field state should be pristine until the user first entered and removed some text. This works fine in e.g. Google Chrome

Minimal reproduction of the problem with instructions http://embed.plnkr.co/fm7lH2/ The red error message should only be display when the user entered and removed some text.

What is the motivation / use case for changing the behavior? Form validation errors should only be displayed when a user touched the form.

Please tell us about your environment: Windows 7 / IE 11

  • Angular version: 2.4.7

  • Browser: IE 11

  • Language: TypeScript

  • Node (for AoT issues): node --version = v6.3.1

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
mmalerbacommented, Mar 3, 2017

It looks like the source of this bug is the fact that MdInputDirective sets up an @Input() on placeholder and then re-binds it in the host. Ideally this should be fixed in angular core.

Here’s an example of this happening with pure angular, no material: http://plnkr.co/edit/cpLxYzEVceJ4MUGiOXi5?p=preview

0reactions
angular-automatic-lock-bot[bot]commented, Sep 5, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

untouched text input is not pristine in IE 11 · Issue #14667 ...
When showing a form in IE 11 with an input field, the initial state of the field is not pristine, leading to error...
Read more >
Angular and Internet Explorer 11 - Inputs Not Working Correctly
Are not correctly updating the model. It looks like an issue with onChange or onFocus events - the inputs never lose their ng-pristine...
Read more >
Angular Form Validation - Stack Abuse
The FormControl object gives information about that field. ... the state of the field such as touched , untouched , dirty , pristine...
Read more >
Angular Forms Guide: Template Driven and Reactive Forms
That would not work as intended because the pristine and untouched statuses of the form and its fields would not get reset accordingly....
Read more >
Reactive Forms in Angular. Hello Readers, | by jinal shah
pristine : This property returns true if the element's contents have not been changed (controls just loaded then returns true). dirty: This ...
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