A lightweight programming environment for desktop and mobile devices

bugfix: initial textinput event on iOS

love.textinput is fragile on iOS. Various things can cause an app to stop receiving textinput events. Resizing the window is one reliable way, but there's also another ghost, something that's triggering on every frame of LÖVE.

Fortunately, it looks like love.keyboard.setTextInput(true) reliably resubscribes the app to textinput events, regardless of their cause.

https://github.com/love2d/love/issues/1959

The one remaining open question here is why the call in App.keychord_press (equivalent to love.keypressed) doesn't fix the breakage caused by the initial window resize (that happens before any keys are pressed). I've confirmed that keypressed comes before textinput on iOS just like everywhere else.

Created by  akkartik  on November 19, 2023
GVOLLPQFFP5G7KCCSCPH42ZHGA5BORMTYN63FUNPXWW7FUK5OW2AC
Change contents