Wrap host selection copy in a try-catch (#1470)
This commit is contained in:
parent
8f057c63fe
commit
c192b4a4c1
@ -1625,10 +1625,18 @@ class Display extends EventDispatcher {
|
||||
|
||||
_copyHostSelection() {
|
||||
if (this._contentOriginFrameId === null || window.getSelection().toString()) { return false; }
|
||||
this._copyHostSelectionInner();
|
||||
this._copyHostSelectionSafe();
|
||||
return true;
|
||||
}
|
||||
|
||||
async _copyHostSelectionSafe() {
|
||||
try {
|
||||
await this._copyHostSelectionInner();
|
||||
} catch (e) {
|
||||
// NOP
|
||||
}
|
||||
}
|
||||
|
||||
async _copyHostSelectionInner() {
|
||||
switch (this._browser) {
|
||||
case 'firefox':
|
||||
|
Loading…
Reference in New Issue
Block a user