Skip to content

Commit

Permalink
Try to fix Android keyboard autocomplete bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kuroski committed Apr 26, 2020
1 parent d4947fc commit 2d4c8b8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
1 change: 1 addition & 0 deletions frontend/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export default {
** Plugins to load before mounting the App
*/
plugins: [
'~/plugins/v-eager',
'~/plugins/vuetify-toast',
'~/plugins/vuelidate',
'~/plugins/vue-the-mask',
Expand Down
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
}
},
"dependencies": {
"@kuroski/v-eager": "^1.0.0",
"@nuxtjs/auth": "^4.9.0",
"@nuxtjs/axios": "^5.3.6",
"@nuxtjs/dotenv": "^1.4.0",
Expand Down
19 changes: 8 additions & 11 deletions frontend/pages/screening-room.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,14 @@
autofocus
></v-text-field>

<!--
v-model not used in the input here because of a known issue with
user interaction and the default Android Chrome keyboard.
https://github.com/vuejs/vue/issues/9777
-->
<v-text-field
id="name"
name="name"
:value="$v.myData.name.$model"
v-model="$v.myData.name.$model"
v-eager
:error-messages="nameErrors"
label="Nome*"
required
@input="setMyDataName"
></v-text-field>

<v-text-field
Expand Down Expand Up @@ -81,6 +76,7 @@
<v-text-field
id="meds"
v-model="medicalInformations.meds"
v-eager
label="Você faz uso de algum remédio todos os dias? Quais?"
hint="Exemplo: Enalapril, Metformina, AAS"
autofocus
Expand All @@ -89,13 +85,15 @@
<v-text-field
id="allergies"
v-model="medicalInformations.allergies"
v-eager
label="Você tem alguma alergia? Quais?"
hint="Exemplo: Dipirona, Penicilina, Paracetamol"
></v-text-field>

<v-text-field
id="covenant"
v-model="medicalInformations.covenant"
v-eager
label="Você tem algum convênio de saúde? Qual?"
hint="Cite seu convênio"
></v-text-field>
Expand Down Expand Up @@ -147,6 +145,7 @@
<v-text-field
id="email"
v-model="contact.email"
v-eager
label="Email"
></v-text-field>

Expand All @@ -167,12 +166,14 @@
<v-text-field
id="hangout"
v-model="contact.hangout"
v-eager
label="Hangouts"
></v-text-field>

<v-text-field
id="skype"
v-model="contact.skype"
v-eager
label="Skype"
></v-text-field>

Expand Down Expand Up @@ -317,10 +318,6 @@ export default {
}
},
methods: {
setMyDataName(value) {
this.myData.name = value
this.$v.myData.name.$touch()
},
checkFacility: debounce(async function check() {
const cep = unmaskText(this.myData.cep)
Expand Down
3 changes: 3 additions & 0 deletions frontend/plugins/v-eager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Vue from 'vue'
import VEager from '@kuroski/v-eager'
Vue.use(VEager)
10 changes: 9 additions & 1 deletion frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1562,6 +1562,14 @@
"@types/yargs" "^15.0.0"
chalk "^3.0.0"

"@kuroski/v-eager@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@kuroski/v-eager/-/v-eager-1.0.0.tgz#732be0a3c64937f45acd2c0d99c9c207be08b569"
integrity sha512-R8T5vneIVorNnCMG1xkV8XIaT0OQnm7TCZfNGBNt0AsbmFXKQfa5WwwnBTrNTIRweNDujyUQw+uIzhCS7omrxQ==
dependencies:
core-js "^3.6.4"
vue "^2.6.11"

"@mrmlnc/readdir-enhanced@^2.2.1":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
Expand Down Expand Up @@ -4246,7 +4254,7 @@ core-js@2, core-js@^2.6.5:
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c"
integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==

[email protected]:
[email protected], core-js@^3.6.4:
version "3.6.5"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a"
integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==
Expand Down

0 comments on commit 2d4c8b8

Please sign in to comment.