ManeraKai / simplytranslate_mobile

Privacy friendly frontend to Google Translate
https://manerakai.github.io/simplytranslate_mobile/
GNU General Public License v3.0
173 stars 15 forks source link

Hiding keyboard #60

Closed Valdnet closed 1 year ago

Valdnet commented 3 years ago

Steps:

  1. Launch the application.
  2. Enter your text.
  3. Hide the keyboard with the down arrow.
  4. Tap on the text box.
  5. Hide the keyboard again with the down arrow.

When you hide the keyboard again with the down arrow, the keyboard will hide and then pop out again, or behave in such a way that you have to tap the down arrow twice to hide the keyboard.

Valdnet commented 3 years ago

This happens when there is a "tear" in the text editor:

obraz

First, the "tear" disappears, and only after the second tap, the keyboard hides.

ManeraKai commented 3 years ago

I don't know, but it's working now. I've tried it before and was the same as you said. I don't know what I changed but it's working now

Valdnet commented 3 years ago

The issue is still present in the latest test version.

Please reopen the issue.

ManeraKai commented 3 years ago

Testing it on a real device:

https://user-images.githubusercontent.com/40805353/134481058-35f59388-2f00-4c0e-b4b8-37d002376137.mp4

Valdnet commented 3 years ago

On my Android 10 device, it works like this:

  1. I click on the text window.
  2. Automatically ejects the keyboard.
  3. I am writing the text.
  4. I close the keyboard.
  5. I click again in the text window.
  6. Automatically slides out the keyboard and shows "tear".
  7. I close the keyboard and here is the difference.

Behavior the difference:

  1. The "tear" disappears and the keyboard hides.
  2. The keyboard restarts automatically without "tear".
ManeraKai commented 3 years ago

There are two requestFocus functions in the code. requestFocus means that the keyboard and the cursor will focus to an input, i.e the translation input, but those functions are just in the paste button file. Nothing else has that. image

Valdnet commented 3 years ago

Maybe there is an unexpected loop somewhere in the code that repeats the automatic eject of the keyboard. It looks as if editing the window has been repeated.

ManeraKai commented 3 years ago

Maybe setState. I'll see

ManeraKai commented 3 years ago

There is really nothing suspicious in the code. This issue will stay open though if anyone encountered the same problem. Maybe we can have more details about the devices having this issue.

Valdnet commented 3 years ago

I would check the editing of the window to see if there is anything suspicious there.

Valdnet commented 3 years ago

I noticed that in a different text editor (another application) First the keyboard hides and then after some time (about 3 second) the "tear" disappears. Maybe this will help you 😉.

Valdnet commented 3 years ago

It looks as if the disappearance of the "tear" starts editing the window again and the keyboard may pop up.

Valdnet commented 3 years ago

I tested this issue even more. In my opinion, the keyboard slides out for the second time, when we hide it when the flashing text cursor is currently invisible. You have to hide the keyboard at the moment when the cursor disappears.

The problem may be that reappearing the cursor as visible activates the edit box and therefore the keyboard pops up again 😁.

This issue may be resolved in #61.

ManeraKai commented 1 year ago

I'll close this since it's mostly be a problem with Flutter not SimplyTranslate Mobile.