InputDialog: set class default for keyboard_visible to false (#12994)

This commit is contained in:
NiLuJe
2025-01-03 17:33:53 +01:00
committed by GitHub
parent 038df71ca5
commit 53f8c2af90
3 changed files with 3 additions and 2 deletions

View File

@@ -614,7 +614,6 @@ function InputDialog:onShowKeyboard(ignore_first_hold_release)
end
-- NOTE: There's no VirtualKeyboard widget instantiated at all when readonly,
-- and our input widget handles that itself, so we don't need any guards here.
-- (In which case, isKeyboardVisible will return `nil`, same as if we had a VK instantiated but *never* shown).
self._input_widget:onShowKeyboard(ignore_first_hold_release)
-- There's a bit of a chicken or egg issue in init where we would like to check the actual keyboard's visibility state,
-- but the widget might not exist or be shown yet, so we'll just have to keep this in sync...

View File

@@ -777,6 +777,8 @@ function InputText:isKeyboardVisible()
if self.keyboard then
return self.keyboard:isVisible()
end
-- NOTE: Never return `nil`, to avoid inheritance issues in (Multi)InputDialog's keyboard_visible flag.
return false
end
function InputText:lockKeyboard(toggle)

View File

@@ -781,7 +781,7 @@ end
local VirtualKeyboard = FocusManager:extend{
name = "VirtualKeyboard",
visible = nil,
visible = false,
lock_visibility = false,
covers_footer = true,
modal = true,