From 9b706c281c9fd5ae13c085572f8532808f36e08d Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Thu, 15 May 2025 14:02:32 -0700 Subject: [PATCH] Allow JavaScript to paste to the keyboard. https://redmine.stoutner.com/issues/1258 --- src/widgets/TabWidget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/widgets/TabWidget.cpp b/src/widgets/TabWidget.cpp index ba52bf4..fc01862 100644 --- a/src/widgets/TabWidget.cpp +++ b/src/widgets/TabWidget.cpp @@ -452,6 +452,9 @@ PrivacyWebEngineView* TabWidget::addTab(const bool removeUrlLineEditFocus, const // Plugins must be enabled for the PDF viewer to work. webEngineSettingsPointer->setAttribute(QWebEngineSettings::PluginsEnabled, true); + // Allow JavaScript to paste to (but not copy from) the clipboard with user interaction. + webEngineSettingsPointer->setAttribute(QWebEngineSettings::JavascriptCanAccessClipboard, true); + // Update the blocked requests action. connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::requestBlocked, [this, privacyWebEngineViewPointer] (const QVector blockedRequestsVector) { -- 2.47.2