mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-08 17:25:12 +00:00
Update PanelContainerComponent.tsx
This commit is contained in:
parent
8f228260a3
commit
140313e5e3
@ -78,15 +78,15 @@ export class PanelContainerComponent extends React.Component<PanelContainerProps
|
|||||||
}
|
}
|
||||||
|
|
||||||
private onDissmiss = (ev?: KeyboardEvent | React.SyntheticEvent<HTMLElement>): void => {
|
private onDissmiss = (ev?: KeyboardEvent | React.SyntheticEvent<HTMLElement>): void => {
|
||||||
const targetElementDataTest: string = useSelectedNode.getState().findSelectedCollection().id();
|
const targetElementDataTest: string | undefined = useSelectedNode.getState().findSelectedCollection().id();
|
||||||
const targetElement: HTMLElement = document.querySelector(`[data-test="${targetElementDataTest}"]`);
|
const targetElement: HTMLElement | null = document.querySelector(`[data-test="${targetElementDataTest}"]`);
|
||||||
if (ev && (ev.target as HTMLElement).id === "notificationConsoleHeader") {
|
if (ev && (ev.target as HTMLElement).id === "notificationConsoleHeader") {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
} else {
|
} else {
|
||||||
useSidePanel.getState().closeSidePanel();
|
useSidePanel.getState().closeSidePanel();
|
||||||
}
|
}
|
||||||
if (targetElement) {
|
if (targetElement) {
|
||||||
const moreButton: HTMLElement = targetElement.querySelector('[name="More"]');
|
const moreButton: HTMLElement | null = targetElement.querySelector('[name="More"]');
|
||||||
if (moreButton) {
|
if (moreButton) {
|
||||||
moreButton.focus();
|
moreButton.focus();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user