We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 232e040 commit 9dfd980Copy full SHA for 9dfd980
shopfloor_mobile_base/static/wms/src/components/searchbar/searchbar.js
@@ -115,7 +115,15 @@ export var Searchbar = Vue.component("searchbar", {
115
},
116
methods: {
117
capture_focus: function () {
118
- if (this.autofocus) this.$refs.searchbar.focus();
+ if (this.autofocus && this.$refs.searchbar) {
119
+ // We need to use both "focus" and "click" in combination
120
+ // to make sure that the searchbar is fully focused and ready for scanning
121
+ // without having to manually tap on it.
122
+ // Using simply one or the other is not enough
123
+ // to always be able to input any scanned text.
124
+ this.$refs.searchbar.focus();
125
+ this.$refs.searchbar.click();
126
+ }
127
128
show_virtual_keyboard: function (elem) {
129
elem.inputMode = this.input_inputmode;
0 commit comments