1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Delay webview create on cluster page (#332)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2020-05-03 10:29:32 +03:00 committed by GitHub
parent 03aab714d8
commit 8d2e8bbe62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,7 +98,7 @@ export default {
toggleLens: function() {
if (!this.lens) { return }
if (this.accessible) {
this.activateLens();
setTimeout(this.activateLens, 0); // see: https://github.com/electron/electron/issues/10016
} else {
this.hideLens();
}
@ -112,10 +112,8 @@ export default {
webview.src = this.cluster.url;
this.lens.webview = webview;
}
setTimeout(() => { // see: https://github.com/electron/electron/issues/10016
this.$store.dispatch("attachWebview", this.lens);
this.$tracker.event("cluster", "open");
}, 0)
this.$store.dispatch("attachWebview", this.lens);
this.$tracker.event("cluster", "open");
},
hideLens: function() {
this.$store.dispatch("hideWebviews");