From: Soren Stoutner Date: Thu, 15 May 2025 21:02:32 +0000 (-0700) Subject: Allow JavaScript to paste to the keyboard. https://redmine.stoutner.com/issues/1258 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=9b706c281c9fd5ae13c085572f8532808f36e08d;p=PrivacyBrowserPC.git Allow JavaScript to paste to the keyboard. https://redmine.stoutner.com/issues/1258 --- 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) {