summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmevent.cpp
diff options
context:
space:
mode:
authorEven Oscar Andersen <even.oscar.andersen@qt.io>2024-03-26 17:41:57 +0100
committerEven Oscar Andersen <even.oscar.andersen@qt.io>2024-04-12 17:31:51 +0000
commite794894ece0bcfc78fa4155cb01d825791ea102b (patch)
tree7dd121c8d373d437361dd2eec9300b24f149737a /src/plugins/platforms/wasm/qwasmevent.cpp
parent92cc21b389aa6e7223ba94daa249092bbac460dc (diff)
:wasm Fix not possible to type tab character in TextEdit
qinputcontrol refused to accept the character since text part of key was empty This caused the tabkey to always switch focus instead Fixes: QTBUG-12423 Change-Id: I9ea7f02831cc88479b4e15d25eac278547f6f711 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmevent.cpp')
-rw-r--r--src/plugins/platforms/wasm/qwasmevent.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/wasm/qwasmevent.cpp b/src/plugins/platforms/wasm/qwasmevent.cpp
index 5ee17e193b..c1d6ce3a2a 100644
--- a/src/plugins/platforms/wasm/qwasmevent.cpp
+++ b/src/plugins/platforms/wasm/qwasmevent.cpp
@@ -113,6 +113,9 @@ KeyEvent::KeyEvent(EventType type, emscripten::val event) : Event(type, event)
text = QString::fromUtf8(webKey);
if (text.size() > 1)
text.clear();
+
+ if (key == Qt::Key_Tab)
+ text = "\t";
}
KeyEvent::~KeyEvent() = default;