parent
14f20d03e3
commit
50b163b128
|
@ -374,7 +374,7 @@ export default {
|
||||||
timePickerTimer: null,
|
timePickerTimer: null,
|
||||||
isKeydown: false,
|
isKeydown: false,
|
||||||
watch: {
|
watch: {
|
||||||
value(newValue) {
|
value() {
|
||||||
this.updateCurrentMetaData();
|
this.updateCurrentMetaData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1899,6 +1899,26 @@ export default {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onInput(val) {
|
||||||
|
// IE 11 Workaround for input placeholder : https://github.com/primefaces/primeng/issues/2026
|
||||||
|
if (!this.isKeydown) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.isKeydown = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.selectionStart = this.$refs.input.$el.selectionStart;
|
||||||
|
this.selectionEnd = this.$refs.input.$el.selectionEnd;
|
||||||
|
|
||||||
|
let value = this.parseValue(val);
|
||||||
|
if (this.isValidSelection(value)) {
|
||||||
|
this.updateModel(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(err) {
|
||||||
|
this.updateModel(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
appendContainer() {
|
appendContainer() {
|
||||||
if (this.appendTo) {
|
if (this.appendTo) {
|
||||||
if (this.appendTo === 'body')
|
if (this.appendTo === 'body')
|
||||||
|
@ -1923,24 +1943,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
...$vm.$listeners,
|
...$vm.$listeners,
|
||||||
input: val => {
|
input: val => {
|
||||||
// IE 11 Workaround for input placeholder : https://github.com/primefaces/primeng/issues/2026
|
this.onInput(val);
|
||||||
if (!$vm.isKeydown) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$vm.isKeydown = false;
|
|
||||||
|
|
||||||
try {
|
|
||||||
this.selectionStart = this.$refs.input.$el.selectionStart;
|
|
||||||
this.selectionEnd = this.$refs.input.$el.selectionEnd;
|
|
||||||
|
|
||||||
let value = $vm.parseValue(val);
|
|
||||||
if ($vm.isValidSelection(value)) {
|
|
||||||
$vm.updateModel(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch(err) {
|
|
||||||
$vm.updateModel(val);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
focus: event => {
|
focus: event => {
|
||||||
$vm.focus = true;
|
$vm.focus = true;
|
||||||
|
|
Loading…
Reference in New Issue