rodrigogs / barracao-digital

Sistema de gerenciamento de fila virtual para os barracões de atendimento do COVID-19
https://barracaodigital.com
BSD 3-Clause "New" or "Revised" License
10 stars 1 forks source link

Bug in the patient name field #52

Closed laurasstephan closed 4 years ago

laurasstephan commented 4 years ago

I am testing as a patient in an old Android default browser ("Samsung internet"?). In the Name field, it only allows me to proceed when I type a name (let's say "Teste") + space. If I do not add the space, it erases whatever I had typed and asks me for the Name again. I've recorded a video of the bug, but it was too big to add here - ask me on Whatsapp.

rodrigogs commented 4 years ago

@laurasstephan I need more technical info about the browser version or at least the phone model and Android version

laurasstephan commented 4 years ago

Phone is SM-G920I and Android version 7.0 Browser is Samsung Internet 11.1.2.2

rodrigogs commented 4 years ago

Found this: https://github.com/vuejs/vue/issues/9777

And it's a very concerning problem. I tried a lot and I couldn't figure a fix out.

@kuroski, would you take a look at this? I think I've exhausted my frontend skills in trying to fix it.

rodrigogs commented 4 years ago

It shall impact a huge amount of users, so it's a high priority.

kuroski commented 4 years ago

Unfortunately, I think there is nothing much we can do right now, this is a problem that happens with some Android devices because of the google keyboard.

There are more issues regarding this problem: https://github.com/vuelidate/vuelidate/issues/534

And there is a PR in the Vue repository to fix that: https://github.com/vuejs/vue/pull/9814

I've tried to use the suggestions from people on the issue and nothing worked:

What happens is:

In some android devices because of the text suggestion of the google keyboard, it won't emit the "input event" until you select some suggestion or press the "space key"

=/

I'll continue trying to fix that, but I don't think we will have much to do.

kuroski commented 4 years ago

Finally, I think I've got it =DDD

First I've tried a different approach: https://github.com/kuroski/v-eager I created this directive to fix the problem.

But then I checked again, and we don't have this problem on other screens that have forms.

Actually the problem was really simple.

We were setting the form variables as null instead of empty strings ''.

Please check the closing commit for more details