kivy iOS TextInput loses focus due to the suggestion and shortcut bar with external keyboard

178 Views Asked by At

As expected, when a TextInput is selected, it receives focus and I can enter text. The shortcut bar appears at the bottom of the screen. If I then select another text field, it is selected briefly and loses focus after a short time.

When I quickly switch back and forth between text fields I get the message from xcode:

[Assert] UIFocusItem: <<_UIRemoteKeyboardPlaceholderView: 0x105d18e90; frame = (0 0; 1024 0); layer = <CALayer: 0x28207cba0>>; size={1024, 0}> with parentFocusEnvironment: <UICompatibilityInputViewController: 0x1113d3600>  focusItemContainer: (null) has no coordinate space.

But I think the problem lies elsewhere.

Now it gets interesting: If I turn off the shortcut bar in iPad under General -> Keyboard -> Shortcut off and Suggestions off, then I can't select any TextInputs at all. Immediately every selected TextInput loses the focus. You can see the cursor flashing briefly.

Edit: Solution

In folder kivy-ios/kivy_ios/recipes/sdl2/ check if the version in __init__.py is the latest release. Check sdl2 releases here. In 2.28.2 is the needed bug fix, so it should be above 2.28.2.

Then in the terminal in kivy-ios folder:

python toolchain.py clean sdl2
python toolchain.py build sdl2

Now it works as expected.

0

There are 0 best solutions below