Skip to content

Commit 1837863

Browse files
author
Pablo Henrique Penha Silva
committed
focus enhancement
1 parent 3b32926 commit 1837863

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/components/mdInputContainer/mdAutocomplete.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<div class="md-autocomplete"
33
@focus="onFocus"
44
@blur="onBlur">
5-
<md-menu :md-offset-x="8" md-offset-y="45"
5+
<md-menu :md-offset-x="8"
6+
md-offset-y="45"
67
ref="menu">
78
<span md-menu-trigger></span>
89
<input class="md-input"
@@ -87,6 +88,12 @@
8788
this.onInput();
8889
this.$emit('selected', this.selected, this.$refs.input.value);
8990
},
91+
onFocus() {
92+
if (this.parentContainer) {
93+
this.parentContainer.isFocused = true;
94+
}
95+
this.$refs.input.focus();
96+
},
9097
onInput() {
9198
this.updateValues();
9299
this.$emit('change', this.$refs.input.value);

0 commit comments

Comments
 (0)