[Workaround exist] [Extension: Mobile keyboard] Deleted letters come back


#1

there is a tiny bug in the extension, I’ll try to explain it with an example:
lets say I wrote “asdasda123” with the keyboard and then hit backspace once, it would delete “3” and I’d be left with “asdasda12”, but then if I type any random letter or number for example “8” I should get “asdasda128” but instead I get “asdasda1238”, so it adds whatever char it deleted last when you type a new char. Also sometimes it deletes 2 chars with backspace. How can this be fixed?


#2

The behavior depends on the browser, the OS and Cordova I’m afraid.
So it is not really a bug in the extension just the usual mess like with any web application. If you package your game for Android it is down to Cordova and the OS if it going to work or not.

This is the result on my end
Edge (Android) - works nicely as expected
Chrome (Android) - works nicely on my end as expected
Firefox (Android) - works nicely as expected
Silk (Fire OS) - works nicely as expected

Chrome (Chrome OS) - delete lest 2 character from the input field but actually delete the last one only
Opera Mini (Chrome OS) - delete last 2 character from the input field but actually delete the last one only

Firefox (Chrome OS) - does not work at all
Opera Mini (Android) - does not work at all


#3

I’m not using a browser, I installed the app apk and bug is still there


#4

The APK uses Cordova which is using Chromium web browser which is using the OS keyboard. So basically the game is running inside the Chromium browser in full screen and the browser is getting the input from the OS keyboard which is different on different versions of the OS. Same thing basically.

It might work on one device but not on the other.
I don’t think it can be fixed on our end and definitely not on all devices.


#5

I will review my code maybe i’ve miss something.

I understand what you said but when i wish reproduce this i’ve not your problem.

This video example is on pc, but i’ve exactly same on my phone


#6

yeah but you saying it’s not a bug sounds weird, just because it works in same cases doesn’t mean it’s not a bug. It should work well on any device that runs an accepted browser and OS. thanks for the reply anyway


#7

I meant, in my opinion it is not a bug in the code Bouh shared with us. Yes, it is a bug but there is nothing we can do about it. It is down to Cordova and Chromium to get this sorted.

Unfortunately it is not that simple.
Each browser has it own JS engine and each works differently even between versions of the same browser so you write your JS code once and you hope it is going to work everywhere in all browsers including Cordova but it won’t be. Something is always broken somewhere if it not Chome then Firefox if it not that then Cordova if not that, then there is a driver issue in the OS version of certain devices and that depends on the manufacturer. There is always something.

Anyhow it is a problem with the technology stack and not GDevelop or any of the extensions.
Nothing is perfect and never be especially if you are using web technology :cry:


#8

Ok I get it, you explained it very well. Kinda sucks that that little annoying problem makes my whole app look terrible tho.
Do you think there is a simple way for Bouh to make backspace delete the whole string? (that would eliminate the bug) At least that will look like an intended feature and not like a bug.


#9

Which mobile you use ?
It can be useful for other users and for debug.
OS version and model.


#10

android 9.0. SM-G950FD


#11

do you think I can somehow make the backspace delete everything, instead of the last char?


#12

You can edit the extension.
Replace line

        //Before
        input.value = input.value.slice(0, -1);
        //After
        input.value = "";


#14

worked great, thank you very much Bouh


closed #15

#16

Please continue the discussion about the extension here :