Skip to content

Commit

Permalink
fix: fix not input in some webview
Browse files Browse the repository at this point in the history
  • Loading branch information
qiqiboy committed May 9, 2020
1 parent d4fa311 commit 2cf262c
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 13 deletions.
14 changes: 11 additions & 3 deletions dist/react-formutil.cjs.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -2169,7 +2169,7 @@ var EasyFieldNative = /*#__PURE__*/function (_Component) {
htmlValue = _this$props.value,
_onChange = _this$props.onChange,
onFocus = _this$props.onFocus,
onBlur = _this$props.onBlur,
_onBlur = _this$props.onBlur,
checked = _this$props.checked,
unchecked = _this$props.unchecked,
others = objectWithoutProperties(_this$props, ["$fieldutil", "value", "onChange", "onFocus", "onBlur", "checked", "unchecked"]);
Expand Down Expand Up @@ -2197,7 +2197,15 @@ var EasyFieldNative = /*#__PURE__*/function (_Component) {
}
},
onFocus: onFocus,
onBlur: onBlur
onBlur: function onBlur(ev) {
if (_this.isComposition) {
_this.isComposition = false;
delete _this.compositionValue;
htmlProps.onChange(ev);
}

return _onBlur(ev);
}
};
var Element = 'input';

Expand Down Expand Up @@ -2232,7 +2240,7 @@ var EasyFieldNative = /*#__PURE__*/function (_Component) {
_onChange(ev.target.checked ? checked : unchecked, ev);
},
onFocus: onFocus,
onBlur: onBlur
onBlur: _onBlur
};
break;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/react-formutil.cjs.production.js

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions dist/react-formutil.esm.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -2104,7 +2104,7 @@ var EasyFieldNative = /*#__PURE__*/function (_Component) {
htmlValue = _this$props.value,
_onChange = _this$props.onChange,
onFocus = _this$props.onFocus,
onBlur = _this$props.onBlur,
_onBlur = _this$props.onBlur,
checked = _this$props.checked,
unchecked = _this$props.unchecked,
others = _objectWithoutProperties(_this$props, ["$fieldutil", "value", "onChange", "onFocus", "onBlur", "checked", "unchecked"]);
Expand Down Expand Up @@ -2132,7 +2132,15 @@ var EasyFieldNative = /*#__PURE__*/function (_Component) {
}
},
onFocus: onFocus,
onBlur: onBlur
onBlur: function onBlur(ev) {
if (_this.isComposition) {
_this.isComposition = false;
delete _this.compositionValue;
htmlProps.onChange(ev);
}

return _onBlur(ev);
}
};
var Element = 'input';

Expand Down Expand Up @@ -2167,7 +2175,7 @@ var EasyFieldNative = /*#__PURE__*/function (_Component) {
_onChange(ev.target.checked ? checked : unchecked, ev);
},
onFocus: onFocus,
onBlur: onBlur
onBlur: _onBlur
};
break;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/react-formutil.esm.production.js

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions dist/react-formutil.umd.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -2656,7 +2656,7 @@
htmlValue = _this$props.value,
_onChange = _this$props.onChange,
onFocus = _this$props.onFocus,
onBlur = _this$props.onBlur,
_onBlur = _this$props.onBlur,
checked = _this$props.checked,
unchecked = _this$props.unchecked,
others = objectWithoutProperties(_this$props, ["$fieldutil", "value", "onChange", "onFocus", "onBlur", "checked", "unchecked"]);
Expand Down Expand Up @@ -2684,7 +2684,15 @@
}
},
onFocus: onFocus,
onBlur: onBlur
onBlur: function onBlur(ev) {
if (_this.isComposition) {
_this.isComposition = false;
delete _this.compositionValue;
htmlProps.onChange(ev);
}

return _onBlur(ev);
}
};
var Element = 'input';

Expand Down Expand Up @@ -2719,7 +2727,7 @@
_onChange(ev.target.checked ? checked : unchecked, ev);
},
onFocus: onFocus,
onBlur: onBlur
onBlur: _onBlur
};
break;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/react-formutil.umd.production.js

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion src/EasyField/Native.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,15 @@ class EasyFieldNative extends Component {
}
},
onFocus,
onBlur
onBlur: ev => {
if (this.isComposition) {
this.isComposition = false;
delete this.compositionValue;
htmlProps.onChange(ev);
}

return onBlur(ev);
}
};
let Element = 'input';

Expand Down

0 comments on commit 2cf262c

Please sign in to comment.