M app.lua => app.lua +4 -2
@@ 70,10 70,12 @@ function love.run()
-- other methods dispatch to real hardware
App.screen.resize = function(width, height, flags)
+ local has_text_input = love.keyboard.hasTextInput()
love.window.setMode(width, height, flags)
if OS == 'iOS' then
- love.keyboard.setTextInput(true) -- magic. iOS seems to lose textinput events after calls to setMode.
- -- https://github.com/love2d/love/issues/1959
+ love.keyboard.setTextInput(has_text_input) -- iOS recreates the window on setMode
+ -- this property is part of the window
+ -- https://github.com/love2d/love/issues/1959
love.keyboard.setKeyRepeat(true)
end
end
M edit.lua => edit.lua +0 -1
@@ 153,7 153,6 @@ function edit.quit(State)
end
function edit.mouse_press(State, x,y, mouse_button)
- love.keyboard.setTextInput(true) -- bring up keyboard on touch screen
if State.search_term then return end
State.mouse_down = mouse_button
--? print_and_log(('edit.mouse_press: cursor at %d,%d'):format(State.cursor1.line, State.cursor1.pos))
M main.lua => main.lua +0 -1
@@ 39,7 39,6 @@ end
-- called only for real run
function App.initialize(arg)
- love.keyboard.setTextInput(true) -- bring up keyboard on touch screen
love.keyboard.setKeyRepeat(true)
Editor_state = nil -- not used outside editor tests