提问人:Chimono 提问时间:7/21/2023 最后编辑:Chimono 更新时间:8/12/2023 访问量:154
kivy iOS TextInput 由于带有外部键盘的建议和快捷键而失去焦点
kivy iOS TextInput loses focus due to the suggestion and shortcut bar with external keyboard
问:
正如预期的那样,当选择 TextInput 时,它会获得焦点,我可以输入文本。快捷栏将显示在屏幕底部。如果我随后选择另一个文本字段,则会短暂选择该文本字段,并在短时间内失去焦点。
当我在文本字段之间快速来回切换时,我从 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.
但我认为问题出在别处。
现在它变得有趣了: 如果我在 iPad 的“常规”->“键盘”-“快捷键”>“关闭”和“建议”下关闭快捷键栏,则根本无法选择任何 TextInputs。每个选定的 TextInput 都会立即失去焦点。您可以看到光标短暂闪烁。
编辑:解决方案
在文件夹 kivy-ios/kivy_ios/recipes/sdl2/ 中,检查 __init__.py 中的版本是否为最新版本。在此处查看 sdl2 版本。在 2.28.2 中是需要的错误修复,因此它应该高于 2.28.2。
然后在 kivy-ios 文件夹的终端中:
python toolchain.py clean sdl2
python toolchain.py build sdl2
现在它按预期工作。
答: 暂无答案
评论