fix(input): update $viewValue when cleared
- Fix when user clicks clear button in an input element in IE, $viewValue not being correctly updated
This should fix #11193.
Cool! I believe writing a test is difficult because we can't click the clear button?
Yeah - fussing around with this a bit to get the right condition currently, but I think the right fix might be attainable here.
This is a little tough - so falsy model changes will convert to the empty string, so this potentially breaks some behavior. Any ideas on good workarounds for that situation?
There are some complicated scenarios I'm having trouble figuring out a good solution to.
Here is an incomplete table:
| Initial view value | Initial model value | View value after view change | Model value after model change | Erroneous IE input events | Run $parsers/$validators |
|---|---|---|---|---|---|
| '' | undefined | '' | N/A | false | true |
| '' | null | '' | N/A | false | true |
| '' | null | N/A | '' | false | true |
| '' | undefined | N/A | N/A | true | false |
Wouldn't it be easier to just add an extra listener on IEs:
element.on('??mousedown/mouseup/click??', function(event) {
deferListener(event, this, this.value);
});
@wesleycho Do you still want to work on this?
Don't have the bandwidth anymore :( .
What's the status on this issue (not doubt i'm not the only one encountering this) Thanks
It has been abandoned (afaict) :grin: If anyone wants to take it over, we will be more than happy to offer guidance and reviews, but I don't think we have the resources to take it over, given that we have less than a month of active feature development before entering LTS.