mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix: closing workspace menu after clicking on iframe (#2349)
This commit is contained in:
parent
df2d79173f
commit
ca39379b3a
@ -11,10 +11,6 @@
|
|||||||
grid-area: main;
|
grid-area: main;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
> * {
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ClustersMenu {
|
.ClustersMenu {
|
||||||
@ -33,6 +29,7 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
background-color: $mainBackground;
|
background-color: $mainBackground;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
iframe {
|
iframe {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|||||||
@ -61,3 +61,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.Menu.WorkspaceMenu {
|
||||||
|
z-index: 2; // Place behind Preferences, Extension pages etc...
|
||||||
|
}
|
||||||
@ -31,7 +31,7 @@
|
|||||||
// covers whole app view area
|
// covers whole app view area
|
||||||
&.showOnTop {
|
&.showOnTop {
|
||||||
position: fixed !important; // allow to cover ClustersMenu
|
position: fixed !important; // allow to cover ClustersMenu
|
||||||
z-index: 1;
|
z-index: 3;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|||||||
@ -82,6 +82,7 @@ export class Menu extends React.Component<MenuProps, State> {
|
|||||||
window.addEventListener("click", this.onClickOutside, true);
|
window.addEventListener("click", this.onClickOutside, true);
|
||||||
window.addEventListener("scroll", this.onScrollOutside, true);
|
window.addEventListener("scroll", this.onScrollOutside, true);
|
||||||
window.addEventListener("contextmenu", this.onContextMenu, true);
|
window.addEventListener("contextmenu", this.onContextMenu, true);
|
||||||
|
window.addEventListener("blur", this.onBlur, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
@ -232,6 +233,12 @@ export class Menu extends React.Component<MenuProps, State> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onBlur() {
|
||||||
|
if (document.activeElement?.tagName == "IFRAME") {
|
||||||
|
this.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected bindRef(elem: HTMLUListElement) {
|
protected bindRef(elem: HTMLUListElement) {
|
||||||
this.elem = elem;
|
this.elem = elem;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user