]> git.ktnx.net Git - icedeb.git/commitdiff
upon pop-up opening, retrieve clipboard in the next animation frame
authorDamyan Ivanov <dmn@debian.org>
Mon, 19 Jun 2017 14:48:21 +0000 (14:48 +0000)
committerDamyan Ivanov <dmn@debian.org>
Mon, 19 Jun 2017 14:48:21 +0000 (14:48 +0000)
otherwise the Paste command returns error. the focusing also doesn't work.
bummer.

a 250ms timeout also seems to work

icedeb.js

index 338f292691466a8fdc677b6c63fd172ce849504f..b730d26ffa16003777c5e6ac3ecda49057bd8055 100644 (file)
--- 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);
+  });
 });