From 5fc167739daaa8df9d4228f728169d19fab86d08 Mon Sep 17 00:00:00 2001 From: Even Oscar Andersen Date: Sat, 3 May 2025 07:48:09 +0200 Subject: [PATCH] wasm: Fix keyboard popping up on cell and tablets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fix for text/button broke cellphones and tablets. (QTBUG-136562) The fix is reverted on 6.9, and fixed here on 6.10 The fix is to set inputMode so that it matches the focus. Change-Id: I88b0a32787ff97b6f5b057e4ebd240f565b5a284 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/wasm/qwasminputcontext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/wasm/qwasminputcontext.cpp b/src/plugins/platforms/wasm/qwasminputcontext.cpp index a04e538d4de..0957af45d89 100644 --- a/src/plugins/platforms/wasm/qwasminputcontext.cpp +++ b/src/plugins/platforms/wasm/qwasminputcontext.cpp @@ -343,6 +343,7 @@ void QWasmInputContext::updateInputElement() else m_inputElement.call("blur"); + m_inputElement.set("inputMode", std::string("none")); return; } @@ -368,6 +369,7 @@ void QWasmInputContext::updateInputElement() m_inputElement.set("selectionStart", queryEvent.value(Qt::ImAnchorPosition).toUInt()); m_inputElement.set("selectionEnd", queryEvent.value(Qt::ImCursorPosition).toUInt()); + m_inputElement.set("inputMode", std::string("text")); m_inputElement.call("focus"); }