diff --git a/src/ui/kit/Kit.lua b/src/ui/kit/Kit.lua index 3eb57b28..0a0867e1 100644 --- a/src/ui/kit/Kit.lua +++ b/src/ui/kit/Kit.lua @@ -848,7 +848,12 @@ function Kit.textfield(id, x, y, w, h, value, placeholder) local focusRing = Kit.focusable(id, x, y, w, h) value = tostring(value or "") - if Kit._activateId == id and not mobile() then + local isHandheld = os.getenv("HANDHELD") == "1" or os.getenv("PORTMASTER") == "1" + or os.getenv("POKEPORT_HANDHELD") == "1" or os.getenv("TRIMUI") == "1" + or os.getenv("MUOS") == "1" or os.getenv("KNULLI") == "1" + + local clickedOrActivated = (Kit._activateId == id) or (isHandheld and Kit.press(x, y, w, h)) + if clickedOrActivated and not mobile() then VirtualKeyboard.open({ text = value, targetId = id,