Skip to content

Commit cdcae1b

Browse files
committed
fix: input bug at ie9 #1421
1 parent 45eb4be commit cdcae1b

File tree

9 files changed

+49
-5
lines changed

9 files changed

+49
-5
lines changed

components/input/Input.jsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,7 @@ export default {
251251
ref: 'input',
252252
key: 'ant-input',
253253
};
254-
if ($listeners['change.value']) {
255-
inputProps.directives = [{ name: 'ant-input' }];
256-
}
254+
inputProps.directives = [{ name: 'ant-input' }];
257255
return this.renderLabeledIcon(prefixCls, <input {...inputProps} />);
258256
},
259257
},

components/vc-calendar/src/date/DateInput.jsx

+3
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ const DateInput = {
178178
name: 'ant-ref',
179179
value: this.saveDateInput,
180180
},
181+
{
182+
name: 'ant-input',
183+
},
181184
],
182185
}}
183186
class={`${prefixCls}-input ${invalidClass}`}

components/vc-calendar/src/year/YearPanel.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function chooseYear(year) {
1515
const value = this.sValue.clone();
1616
value.year(year);
1717
value.month(this.sValue.month());
18-
this.sValue = value
18+
this.sValue = value;
1919
this.__emit('select', value);
2020
}
2121

components/vc-pagination/Options.jsx

+7
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ export default {
129129
onChange={this.handleChange}
130130
onKeyup={this.go}
131131
onBlur={this.handleBlur}
132+
{...{
133+
directives: [
134+
{
135+
name: 'ant-input',
136+
},
137+
],
138+
}}
132139
/>
133140
{locale.page}
134141
{gotoButton}

components/vc-pagination/Pagination.jsx

+7
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,13 @@ export default {
355355
onKeyup={this.handleKeyUp}
356356
onInput={this.handleKeyUp}
357357
size="3"
358+
{...{
359+
directives: [
360+
{
361+
name: 'ant-input',
362+
},
363+
],
364+
}}
358365
/>
359366
<span class={`${prefixCls}-slash`}></span>
360367
{allPages}

components/vc-select/Select.jsx

+13-1
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,19 @@ const Select = {
733733
const props = this.$props;
734734
const { _inputValue: inputValue } = this.$data;
735735
const attrs = getAttrs(this);
736-
const defaultInput = <input id={attrs.id} autoComplete="off" />;
736+
const defaultInput = (
737+
<input
738+
{...{
739+
directives: [
740+
{
741+
name: 'ant-input',
742+
},
743+
],
744+
}}
745+
id={attrs.id}
746+
autoComplete="off"
747+
/>
748+
);
737749

738750
const inputElement = props.getInputElement ? props.getInputElement() : defaultInput;
739751
const inputCls = classnames(getClass(inputElement), {

components/vc-time-picker/Header.jsx

+7
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,13 @@ const Header = {
178178
placeholder={placeholder}
179179
onInput={this.onInputChange}
180180
readOnly={!!inputReadOnly}
181+
{...{
182+
directives: [
183+
{
184+
name: 'ant-input',
185+
},
186+
],
187+
}}
181188
/>
182189
);
183190
},

components/vc-time-picker/TimePicker.jsx

+7
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,13 @@ export default {
377377
autoFocus={autoFocus}
378378
readOnly={!!inputReadOnly}
379379
id={id}
380+
{...{
381+
directives: [
382+
{
383+
name: 'ant-input',
384+
},
385+
],
386+
}}
380387
/>
381388
{inputIcon || <span class={`${prefixCls}-icon`} />}
382389
{this.renderClearButton()}

components/vc-tree-select/src/SearchInput.jsx

+3
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ const SearchInput = {
103103
name: 'ant-ref',
104104
value: this.inputRef,
105105
},
106+
{
107+
name: 'ant-input',
108+
},
106109
],
107110
}}
108111
onInput={onSearchInputChange}

0 commit comments

Comments
 (0)