timofei-iatsenko / angular-cc-library

Library to support Credit Card input masking and validation
MIT License
82 stars 71 forks source link

fix: Input refocusing in IE11 #35

Closed gavmck closed 6 years ago

gavmck commented 6 years ago

When clicking between empty inputs in IE11, the edited lines cause the previously active input to refocus, breaking the UI.

By checking the current target is the active elements, it looks like it fixes it and maintains current behaviour.

Have updated the tests to comply with the new behaviour and fixed a couple of other tests that look like they were out of date too.

Fixes #34

gavmck commented 6 years ago

Well this is awkward.

I think this changes prevents formatting occurring on change when using autocomplete.

Just looking into a fix now.