We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f690087 commit eda4e4cCopy full SHA for eda4e4c
1 file changed
src/index.js
@@ -162,7 +162,7 @@ var MaskedInput = React.createClass({
162
163
e.preventDefault()
164
this._updateMaskSelection()
165
- if (this.mask.input(e.key)) {
+ if (this.mask.input((e.key || e.data))) {
166
e.target.value = this.mask.getValue()
167
this._updateInputSelection()
168
if (this.props.onChange) {
@@ -208,7 +208,7 @@ var MaskedInput = React.createClass({
208
maxLength={patternLength}
209
onChange={this._onChange}
210
onKeyDown={this._onKeyDown}
211
- onKeyPress={this._onKeyPress}
+ onBeforeInput={this._onKeyPress}
212
onPaste={this._onPaste}
213
placeholder={placeholder || this.mask.emptyValue}
214
size={size || patternLength}
0 commit comments