libgdx icon indicating copy to clipboard operation
libgdx copied to clipboard

scene2d.ui.TextField doesn't use 'keyboard' field consistently

Open Betalord opened this issue 3 years ago • 0 comments

TextField has a 'keyboard' member which it uses to show keyboard (on Android), however in order to hide the keyboard, it uses hardcoded call: Gdx.input.setOnscreenKeyboardVisible(false); which makes no sense - either use on or the other. For example, when showing the on-screen keyboard, it uses keyboard.show(true) (line 850), when hidding it however it calls the above line (which 'keyboard' uses as well, but the point of 'keyboard' is to allow user to override it with proper implementation - which makes no sense if TextField is using it only for showing and not also for hiding the keyboard).

So, the line cited above should be changed to keyboard.show(false);.

LibGDX version: all (up to current master, 1.11.0).

Betalord avatar Jul 30 '22 13:07 Betalord