wasm: Fix keyboard popping up on cell and tablets

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 <morten.sorvig@qt.io>
This commit is contained in:
Even Oscar Andersen 2025-05-03 07:48:09 +02:00
parent cb65dc8f93
commit 5fc167739d

View File

@ -343,6 +343,7 @@ void QWasmInputContext::updateInputElement()
else
m_inputElement.call<void>("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<void>("focus");
}