From: Damyan Ivanov Date: Mon, 19 Jun 2017 14:48:21 +0000 (+0000) Subject: upon pop-up opening, retrieve clipboard in the next animation frame X-Git-Tag: 2.0~17 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=518414298c349bd8721e52d13c3872f35d168760;p=icedeb.git upon pop-up opening, retrieve clipboard in the next animation frame otherwise the Paste command returns error. the focusing also doesn't work. bummer. a 250ms timeout also seems to work --- diff --git a/icedeb.js b/icedeb.js index 338f292..b730d26 100644 --- a/icedeb.js +++ b/icedeb.js @@ -190,5 +190,7 @@ window.addEventListener('DOMContentLoaded', (e) => { save_settings(); }); - get_clipboard_contents(); + window.requestAnimationFrame(()=>{ + window.requestAnimationFrame(get_clipboard_contents); + }); });