Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

input: length property and model not updated after using IE "clear field" button #10872

Closed
QuentinLuc opened this issue Aug 28, 2017 · 2 comments
Assignees
Labels
browser: IE This issue is specific to Internet Explorer P4: minor Minor issues. May not be fixed without community contributions. severity: inconvenient

Comments

@QuentinLuc
Copy link

Actual Behavior:

  • Using IE, WHEN an input has 'md-maxlength="x"' attribute AND the user clicks on the "Clear field" button ", THEN the field is cleared but the length property is not updated.
  • The length property should be updated to display '0/x' in this case because the field is empty.

Screen:
image
This issue can be reproduced on the Angular Material website: https://material.angularjs.org/latest/demo/input

AngularJS Versions: *

  • AngularJS Material Version: 1.1.4
@mckenzielong
Copy link
Contributor

FWIW I also see this happening on a regular input too: https://plnkr.co/edit/s8B7cuhlUOtK8UBFudpz?p=preview

@Splaktar Splaktar added the browser: IE This issue is specific to Internet Explorer label Feb 27, 2018
@Splaktar Splaktar added this to the 1.1.9 milestone Feb 27, 2018
@Splaktar Splaktar added needs: investigation The cause of this issue is not well understood and needs to be investigated by the team or community type: bug severity: inconvenient ux: polish P4: minor Minor issues. May not be fixed without community contributions. labels Feb 27, 2018
@Splaktar Splaktar modified the milestones: 1.1.9, 1.1.10 Apr 19, 2018
@Splaktar Splaktar modified the milestones: 1.1.10, 1.1.11 Jun 19, 2018
@Splaktar Splaktar changed the title Input length property not updated after using IE "clear field" button input: length property not updated after using IE "clear field" button Aug 29, 2018
@Splaktar Splaktar added hotlist: angular-issue and removed needs: investigation The cause of this issue is not well understood and needs to be investigated by the team or community type: bug ux: polish labels Aug 29, 2018
@Splaktar Splaktar self-assigned this Aug 29, 2018
@Splaktar Splaktar removed this from the 1.1.11 milestone Aug 29, 2018
@Splaktar Splaktar changed the title input: length property not updated after using IE "clear field" button input: length property and model not updated after using IE "clear field" button Aug 29, 2018
@Splaktar
Copy link
Member

This is a bug in AngularJS: angular/angular.js#11193

There is a PR for it (angular/angular.js#14772) but it has been abandoned and no one has continued with the work yet.

This StackOverflow question has a lot of possible workarounds.

If you are following Material Design, then I would suggest taking the following approach to hide the -ms-clear buttons. Then you can add a clear icon button that aligns with the Material Design Spec and works across all browsers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
browser: IE This issue is specific to Internet Explorer P4: minor Minor issues. May not be fixed without community contributions. severity: inconvenient
Projects
None yet
Development

No branches or pull requests

3 participants