diff options
author | Morten Sørvig <[email protected]> | 2024-09-06 15:09:04 +0200 |
---|---|---|
committer | Morten Sørvig <[email protected]> | 2024-10-22 18:53:57 +0200 |
commit | bcbe7e23357c9ef15e82c36a7518fb27edd35660 (patch) | |
tree | 51aa10687ce9b764072eccdcc32305a2c639d552 /src/plugins/platforms/wasm/qwasmwindow.cpp | |
parent | 82cf2f08d31be977ea3b54f84e968044d9f7013e (diff) |
wasm: don't set contentEditable on the canvas
The canvas is aria-hidden, and should not take focus
or handle events. Move this to the window contents
element.
Task-number: QTBUG-128732
Change-Id: I54453d067570b9e2c9db9c7293f267f4cfc0aacd
Reviewed-by: Piotr Wierciński <[email protected]>
Reviewed-by: Tor Arne Vestbø <[email protected]>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmwindow.cpp')
-rw-r--r-- | src/plugins/platforms/wasm/qwasmwindow.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/platforms/wasm/qwasmwindow.cpp b/src/plugins/platforms/wasm/qwasmwindow.cpp index 7b85e31c249..ba325bac121 100644 --- a/src/plugins/platforms/wasm/qwasmwindow.cpp +++ b/src/plugins/platforms/wasm/qwasmwindow.cpp @@ -74,16 +74,16 @@ QWasmWindow::QWasmWindow(QWindow *w, QWasmDeadKeySupport *deadKeySupport, m_canvas["classList"].call<void>("add", emscripten::val("qt-window-canvas")); - // Set contenteditable so that the canvas gets clipboard events, + // Set contentEditable so that the window gets clipboard events, // then hide the resulting focus frame. - m_canvas.set("contentEditable", std::string("true")); - m_canvas["style"].set("outline", std::string("none")); + m_windowContents.set("contentEditable", std::string("true")); + m_windowContents["style"].set("outline", std::string("none")); - QWasmClipboard::installEventHandlers(m_canvas); + QWasmClipboard::installEventHandlers(m_windowContents); - // set inputMode to none to stop mobile keyboard opening - // when user clicks anywhere on the canvas. - m_canvas.set("inputMode", std::string("none")); + // Set inputMode to none to stop the mobile keyboard from opening + // when the user clicks on the window. + m_windowContents.set("inputMode", std::string("none")); // Hide the canvas from screen readers. m_canvas.call<void>("setAttribute", std::string("aria-hidden"), std::string("true")); |