community icon indicating copy to clipboard operation
community copied to clipboard

Text Input typing bug

Open Neizvestnyj opened this issue 3 years ago • 26 comments

  • Python: 3.8
  • OS: android
  • Kivy: master
  • Kivy installation method: pip

When you enter text in the text field, after pressing the space bar, it disappears somewhere, if you start erasing it, it appears, but only after erasing the visible characters.

https://user-images.githubusercontent.com/40869738/110664448-745b6d80-81d8-11eb-8b8c-928131a487bc.mp4

Neizvestnyj avatar Mar 10 '21 16:03 Neizvestnyj

https://youtu.be/OCk6OuXq4dA explains the problem. This is just a reference. Please try that app and report if issue is exactly the same. I have tried that and can confirm that when using keyboard via otg, the problem mentioned in video disappears

darpan5552 avatar Mar 11 '21 12:03 darpan5552

https://youtu.be/OCk6OuXq4dA explains the problem.

As I understand this is a bug, but how to fix it? In version 2.0.0 everything works but there are no word predictions

Neizvestnyj avatar Mar 11 '21 12:03 Neizvestnyj

https://youtu.be/OCk6OuXq4dA explains the problem. This is just a reference. Please try that app and report if issue is exactly the same. I have tried that and can confirm that when using keyboard via otg, the problem mentioned in video disappears

I downloaded the app from the video above, the bug is the same

Neizvestnyj avatar Mar 11 '21 18:03 Neizvestnyj

@darpan5552

https://user-images.githubusercontent.com/40869738/110835925-7abd1880-82b0-11eb-8fcb-5c3bdb76d0f0.mp4

Neizvestnyj avatar Mar 11 '21 18:03 Neizvestnyj

  • Upon close observation, we can observe that kivy is forgetting its cursor position. Suppose we are at position1 to type 4 characters, then for typing 5th character if we go to position2, all the 4 characters including 5th character comes at position2. This behavior is particular to initial state only.
  • New line character works in initial state, but when we shift to other application and come back to kivy, new line character does not work at all.

darpan5552 avatar Mar 12 '21 10:03 darpan5552

@darpan5552 Yes, this is a textinput bug, I looked at the source code, but I still can't figure out where the error is

Neizvestnyj avatar Mar 12 '21 10:03 Neizvestnyj

@Neizvestnyj May be the bug is in kivy.core.text instead of kivy.uix.textinput

darpan5552 avatar Mar 12 '21 13:03 darpan5552

@darpan5552 Don't know (

Neizvestnyj avatar Mar 12 '21 15:03 Neizvestnyj

i can confirm weird behaviors, it still kind of work, if you trust it to do the right thing and continue, but this is not ideal. https://user-images.githubusercontent.com/22759/112563046-e89d3000-8dd8-11eb-949b-840e2a2aed66.mp4

tshirtman avatar Mar 26 '21 01:03 tshirtman

  • Python: 3.8
  • OS: android
  • Kivy: master
  • Kivy installation method: pip

When you enter text in the text field, after pressing the space bar, it disappears somewhere, if you start erasing it, it appears, but only after erasing the visible characters.

bug.mp4

Hi, I'm sorry for possible spaming, but I'm having a relatable problem #7545. Have you been able to find some kind of workaround?

olek5andr avatar Jun 19 '21 16:06 olek5andr

  • Python: 3.8
  • OS: android
  • Kivy: master
  • Kivy installation method: pip

When you enter text in the text field, after pressing the space bar, it disappears somewhere, if you start erasing it, it appears, but only after erasing the visible characters. bug.mp4

Hi, I'm sorry for possible spaming, but I'm having a relatable problem #7545. Have been able to find some kind of workaround?

No, it doesn't work at the moment

Neizvestnyj avatar Jun 19 '21 17:06 Neizvestnyj

@olek5andr Use kivy==2.0.0 I have observed that it's working much better

darpan5552 avatar Jun 19 '21 17:06 darpan5552

Yes, at the moment the problem is still being solved

Neizvestnyj avatar Jun 19 '21 17:06 Neizvestnyj

@olek5andr Use kivy==2.0.0 I have observed that it's working much better

Using kivy == 2.0.0 is not an option, because when using kivy=2.0.0 with kivymd it is lagging drastically on an Android device. It appears to run much smoother when kivy==master, but then this issue with TextInput arises. I'm trying to identify the specific commit after which it started, wasn't able to find it yet...

olek5andr avatar Jun 19 '21 17:06 olek5andr

@olek5andr I am using kivy==2.0.0 with kivymd==0.104.1 and still haven't observed any lagging. May be those application are lot simpler. https://github.com/kengoon/PyJniusTester https://github.com/dcindia/matrix-calculator https://github.com/dcindia/KivyAppUpdater

darpan5552 avatar Jun 19 '21 17:06 darpan5552

It seems the problem still exists in version 2.0.0. Also I had encountered another bug that might related to this issue: When pasting long text using gboard auto paste feature the pasted text is incomplete.

ChihayaK avatar Aug 06 '21 02:08 ChihayaK

any updates !👀

ghost avatar Nov 15 '21 17:11 ghost

Can someone test if the bug persists if using p4a manually, since i tried it and it was fixed

leamikmik avatar Dec 15 '21 16:12 leamikmik

@Philipmikmik what you mean exactly

ghost avatar Dec 15 '21 16:12 ghost

@hussam132 well i was working on a app that experienced this error and now after some time i tried python-for-android by itself, but i also changed a lot of things like my os, python version etc. in the time passed and cannot confirm it was that that fixed it. So im asking if someone can test it

leamikmik avatar Dec 15 '21 16:12 leamikmik

I don't think it's p4a issue @Philipmikmik It's more kivy issue but anyway can you list the changes you made

ghost avatar Dec 15 '21 16:12 ghost

@hussam132 im sorry but i dont think thats possible, since its been over half a year. And i also had a problem that made buildozer unusable thats why i used p4a, its possible the error got cleared in that time

leamikmik avatar Dec 15 '21 16:12 leamikmik

Has anyone fixed it yet? (TextInput)

rqsrdco avatar Jan 14 '22 14:01 rqsrdco

Any updates ? I'm using kivy version 2.0.0 and the bug still appearing.

nxtsoul avatar Mar 14 '22 18:03 nxtsoul

Any updates ? I'm using kivy version 2.0.0 and the bug still appearing.

No, in 2.1.0 this feature was removed

Neizvestnyj avatar Mar 14 '22 19:03 Neizvestnyj

Python: 3.10.4 OS: android Kivy: 2.1.0 master Kivymd: 1.0.2 buildozer: 1.4.0 p4a: 2022.7.20 Kivy installation method: pip (pipenv)

I'm facing the same behavior as @Neizvestnyj described in his/her first post. Is anybody working on that issue or is a workaround available? @tshirtman Thank you for every small hint.

Drohne1 avatar Sep 01 '22 18:09 Drohne1

I saw this behavior already in this environment: Python: 2.7.2 OS: android (version newer than 7.1.1) Kivy: 1.9.0

Problem wasn't there at least until android-version 7.1.1, (Sony Z4). It appeared with newer devices like Samsung Galaxy Tab A8 (don't know exactly when it first came up).

For some other reason I upgraded: Python: 3.9.9 OS: android 11 Kivy: 2.1.0

I was hoping in the meantime this bug has been found and eliminated. But not :( From my observation there is some connection to the android-version! Any hint to solve or workaround this would be very welcome ...

OrangMutan avatar Nov 23 '22 01:11 OrangMutan

I wanted to verify, if my statement above is true: I installed new apk (Python: 3.9.9, Kivy: 2.1.0) on my old Sony Z4 with android 7.1.1, and - contradicting to what I said - bug in TextInput occurs. So: There is no obvious connection to the version of android. Would like to help in finding a solution - but don't know how ...

OrangMutan avatar Nov 23 '22 13:11 OrangMutan