diff options
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmwindow.cpp')
| -rw-r--r-- | src/plugins/platforms/wasm/qwasmwindow.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/platforms/wasm/qwasmwindow.cpp b/src/plugins/platforms/wasm/qwasmwindow.cpp index e3e5f064811..eaf9a67e152 100644 --- a/src/plugins/platforms/wasm/qwasmwindow.cpp +++ b/src/plugins/platforms/wasm/qwasmwindow.cpp @@ -95,7 +95,11 @@ QWasmWindow::QWasmWindow(QWindow *w, QWasmDeadKeySupport *deadKeySupport, m_window.set("contentEditable", std::string("true")); m_window["style"].set("outline", std::string("none")); - QWasmClipboard::installEventHandlers(m_window); + if (QWasmClipboard::shouldInstallWindowEventHandlers()) { + m_cutCallback = QWasmEventHandler(m_window, "cut", QWasmClipboard::cut); + m_copyCallback = QWasmEventHandler(m_window, "copy", QWasmClipboard::copy); + m_pasteCallback = QWasmEventHandler(m_window, "paste", QWasmClipboard::paste); + } #endif // Set inputMode to none to stop the mobile keyboard from opening |
