fixed so masked input works with chrome auto-fill and on paste#32
fixed so masked input works with chrome auto-fill and on paste#32axelson wants to merge 1 commit intoinsin:masterfrom
Conversation
Edit: Rebased onto latest master Only kept relevant change. Change to dist was dropped to help avoid merge conflicts Add phone number example to demo page
| setTimeout(this._updateInputSelection, 0) | ||
| this.props.onChange(e) | ||
| } | ||
| else { |
There was a problem hiding this comment.
Could you educate me on why the if (this.mask.paste(e.clipboardData.getData('Text')) {...} part just before this block returns falsy and falls through to this?
There was a problem hiding this comment.
The falsy return happens here https://github.com/insin/inputmask-core/blob/master/lib/index.js#L374-L393 on line 391. I'm not exactly sure what that means, but I can dive into it more if need be.
|
@axelson any response to those qs? That and a rebase and hopefully we can land this. |
|
Any progress on this? I'd rather not fork this project. |
|
+1 |
|
@alpjor might be worth checking out https://github.com/Pephers/react-autofill |
|
@aesopwolf neat, thanks for link, but I'm pretty conceptually against polling for event listeners if I can help it. |
|
I published a fork of this PR to npm for the time being https://www.npmjs.com/package/react-maskedinput-autofill |
|
Trying to use the published version from npm pushed out by @aesopwolf I discovered a minor bug. If the paste falls through to the second paste method, onChange never fires. I fixed that in https://github.com/lassombra/react-maskedinput so that I could use this, However I'm unsure how you would like to handle this as that would effectively be a pull request of a pull request... Specifically this is fixed in this commit: lassombra@b760ed2 |
Fixes issue #21
Edit:
Rebased onto latest master
Only kept relevant change. Change to dist was dropped to help avoid
merge conflicts
Add phone number example to demo page
Test code (add to demo/index.html):