mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
GUACAMOLE-55: Define wait period before clipboard reads with a documented constant.
This commit is contained in:
@@ -32,6 +32,18 @@ angular.module('clipboard').factory('clipboardService', ['$injector',
|
|||||||
|
|
||||||
var service = {};
|
var service = {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The amount of time to wait before actually serving a request to read
|
||||||
|
* clipboard data, in milliseconds. Providing a reasonable delay between
|
||||||
|
* request and read attempt allows the cut/copy operation to settle, in
|
||||||
|
* case the data we are anticipating to be present is not actually present
|
||||||
|
* in the clipboard yet.
|
||||||
|
*
|
||||||
|
* @constant
|
||||||
|
* @type Number
|
||||||
|
*/
|
||||||
|
var CLIPBOARD_READ_DELAY = 100;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to the window.document object.
|
* Reference to the window.document object.
|
||||||
*
|
*
|
||||||
@@ -399,7 +411,7 @@ angular.module('clipboard').factory('clipboardService', ['$injector',
|
|||||||
originalElement.focus();
|
originalElement.focus();
|
||||||
popSelection();
|
popSelection();
|
||||||
|
|
||||||
}, 100);
|
}, CLIPBOARD_READ_DELAY);
|
||||||
|
|
||||||
return deferred.promise;
|
return deferred.promise;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user