Replacing dialog keypress target

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2020-09-09 11:39:42 +03:00
1 parent 295333d055
commit 4118d9d1e5
3 files changed
+4 -5

No files matched your search

+1 -2
View File
@@ -1,4 +1,3 @@
import { WorkspaceId, workspaceStore } from "./workspace-store";
import path from "path"; import path from "path";
import { app, ipcRenderer, remote } from "electron"; import { app, ipcRenderer, remote } from "electron";
import { unlink } from "fs-extra"; import { unlink } from "fs-extra";
@@ -13,7 +12,7 @@ import { saveToAppFiles } from "./utils/saveToAppFiles";
import { KubeConfig } from "@kubernetes/client-node"; import { KubeConfig } from "@kubernetes/client-node";
import _ from "lodash"; import _ from "lodash";
import move from "array-move"; import move from "array-move";
import { is } from "immer/dist/internal"; import type { WorkspaceId } from "./workspace-store";
export interface ClusterIconUpload { export interface ClusterIconUpload {
clusterId: string; clusterId: string;
+2 -2
View File
@@ -92,7 +92,7 @@ export class Dialog extends React.PureComponent<DialogProps, DialogState> {
this.props.onOpen(); this.props.onOpen();
if (!this.props.pinned) { if (!this.props.pinned) {
if (this.elem) this.elem.addEventListener('click', this.onClickOutside); if (this.elem) this.elem.addEventListener('click', this.onClickOutside);
window.addEventListener('keydown', this.onEscapeKey); document.body.addEventListener('keydown', this.onEscapeKey);
} }
} }
@@ -100,7 +100,7 @@ export class Dialog extends React.PureComponent<DialogProps, DialogState> {
this.props.onClose(); this.props.onClose();
if (!this.props.pinned) { if (!this.props.pinned) {
if (this.elem) this.elem.removeEventListener('click', this.onClickOutside); if (this.elem) this.elem.removeEventListener('click', this.onClickOutside);
window.removeEventListener('keydown', this.onEscapeKey); document.body.removeEventListener('keydown', this.onEscapeKey);
} }
} }
+1 -1
View File
@@ -40,7 +40,7 @@
div.logo-text { div.logo-text {
position: absolute; position: absolute;
left: 42px; left: 42px;
top: 11.5px; top: 11px;
} }
.logo-icon { .logo-icon {