mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-06-04 15:38:59 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user