]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/commitdiff
Allow JavaScript to paste to the keyboard. https://redmine.stoutner.com/issues/1258
authorSoren Stoutner <soren@stoutner.com>
Thu, 15 May 2025 21:02:32 +0000 (14:02 -0700)
committerSoren Stoutner <soren@stoutner.com>
Thu, 15 May 2025 21:02:32 +0000 (14:02 -0700)
src/widgets/TabWidget.cpp

index ba52bf4c412c6c7cba15c8a4104c1344c0b19ee6..fc01862c1a83d5e0af4b31834fcefa365fc9c979 100644 (file)
@@ -452,6 +452,9 @@ PrivacyWebEngineView* TabWidget::addTab(const bool removeUrlLineEditFocus, const
     // Plugins must be enabled for the PDF viewer to work.  <https://doc.qt.io/qt-5/qtwebengine-features.html#pdf-file-viewing>
     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<int> blockedRequestsVector)
     {