Skip to content

Commit abd1b7f

Browse files
committed
fix: input not work at firefox && sogou #2151
1 parent 352eb84 commit abd1b7f

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

components/input/Input.jsx

+3
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ export default {
173173
});
174174
},
175175
handleChange(e) {
176+
if (e.inputType === 'insertCompositionText') {
177+
return;
178+
}
176179
const { value, composing } = e.target;
177180
// https://github.com/vueComponent/ant-design-vue/issues/2203
178181
if ((composing && this.lazy) || this.stateValue === value) return;

components/input/TextArea.jsx

+3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ export default {
6969
this.$emit('input', e);
7070
},
7171
handleChange(e) {
72+
if (e.inputType === 'insertCompositionText') {
73+
return;
74+
}
7275
const { value, composing } = e.target;
7376
if ((composing && this.lazy) || this.stateValue === value) return;
7477

components/vc-tabs/src/InkTabBarNode.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export default {
9898
activeKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
9999
},
100100
updated() {
101-
setTimeout(() => {
101+
this.$nextTick(function() {
102102
componentDidUpdate(this);
103103
});
104104
},

components/vc-tabs/src/ScrollableTabBarNode.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default {
5252
},
5353

5454
updated() {
55-
setTimeout(() => {
55+
this.$nextTick(() => {
5656
this.updatedCal(this.prevProps);
5757
this.prevProps = { ...this.$props };
5858
});

0 commit comments

Comments
 (0)