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:
parent
03aab714d8
commit
8d2e8bbe62
@ -98,7 +98,7 @@ export default {
|
|||||||
toggleLens: function() {
|
toggleLens: function() {
|
||||||
if (!this.lens) { return }
|
if (!this.lens) { return }
|
||||||
if (this.accessible) {
|
if (this.accessible) {
|
||||||
this.activateLens();
|
setTimeout(this.activateLens, 0); // see: https://github.com/electron/electron/issues/10016
|
||||||
} else {
|
} else {
|
||||||
this.hideLens();
|
this.hideLens();
|
||||||
}
|
}
|
||||||
@ -112,10 +112,8 @@ export default {
|
|||||||
webview.src = this.cluster.url;
|
webview.src = this.cluster.url;
|
||||||
this.lens.webview = webview;
|
this.lens.webview = webview;
|
||||||
}
|
}
|
||||||
setTimeout(() => { // see: https://github.com/electron/electron/issues/10016
|
this.$store.dispatch("attachWebview", this.lens);
|
||||||
this.$store.dispatch("attachWebview", this.lens);
|
this.$tracker.event("cluster", "open");
|
||||||
this.$tracker.event("cluster", "open");
|
|
||||||
}, 0)
|
|
||||||
},
|
},
|
||||||
hideLens: function() {
|
hideLens: function() {
|
||||||
this.$store.dispatch("hideWebviews");
|
this.$store.dispatch("hideWebviews");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user