Add a check if the URL bar selection is fired from user-input.

This overrides the spec for input elements to special-case where we're not actually having the user select anything, but where it results from automatically-generated selections (e.g. autofill).
This should fix #852, but will require Linux testing since Windows doesn't use a primary this way.
This commit is contained in:
Pale Moon
2017-01-21 18:07:32 +01:00
committed by roytam1
parent 0552e8b0f6
commit 0d35fc58e0
+7
View File
@@ -741,6 +741,13 @@
.getService(Ci.nsIClipboard)
.supportsSelectionClipboard())
return;
// Check if this selection was actually user-generated, and exit if not
// to prevent copying the selection (e.g autofill) to clipboard/primary
if (!window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils)
.isHandlingUserInput)
return;
var val = this._getSelectedValueForClipboard();
if (!val)