Enables sandbox on about window
This commit is contained in:
parent
58691b2f5e
commit
4591b56f7f
27 changed files with 262 additions and 93 deletions
|
@ -3,28 +3,28 @@
|
|||
|
||||
import React from 'react';
|
||||
|
||||
import type { ExecuteMenuRoleType } from './TitleBarContainer';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { TitleBarContainer } from './TitleBarContainer';
|
||||
import { useEscapeHandling } from '../hooks/useEscapeHandling';
|
||||
import { useTheme } from '../hooks/useTheme';
|
||||
import { TitleBarContainer } from './TitleBarContainer';
|
||||
import type { ExecuteMenuRoleType } from './TitleBarContainer';
|
||||
|
||||
export type PropsType = {
|
||||
closeAbout: () => unknown;
|
||||
environment: string;
|
||||
executeMenuRole: ExecuteMenuRoleType;
|
||||
hasCustomTitleBar: boolean;
|
||||
i18n: LocalizerType;
|
||||
version: string;
|
||||
hasCustomTitleBar: boolean;
|
||||
executeMenuRole: ExecuteMenuRoleType;
|
||||
};
|
||||
|
||||
export function About({
|
||||
closeAbout,
|
||||
i18n,
|
||||
environment,
|
||||
version,
|
||||
hasCustomTitleBar,
|
||||
executeMenuRole,
|
||||
hasCustomTitleBar,
|
||||
i18n,
|
||||
version,
|
||||
}: PropsType): JSX.Element {
|
||||
useEscapeHandling(closeAbout);
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ import type { Theme } from '../util/theme';
|
|||
import { themeClassName } from '../util/theme';
|
||||
import { refMerger } from '../util/refMerger';
|
||||
import { offsetDistanceModifier } from '../util/popperUtil';
|
||||
import { getInteractionMode } from '../services/InteractionMode';
|
||||
|
||||
type EventWrapperPropsType = {
|
||||
children: React.ReactNode;
|
||||
|
@ -35,7 +36,7 @@ const TooltipEventWrapper = React.forwardRef<
|
|||
}, [onHoverChanged]);
|
||||
|
||||
const onFocus = React.useCallback(() => {
|
||||
if (window.getInteractionMode() === 'keyboard') {
|
||||
if (getInteractionMode() === 'keyboard') {
|
||||
on();
|
||||
}
|
||||
}, [on]);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import React from 'react';
|
||||
import { getInteractionMode } from '../../services/InteractionMode';
|
||||
|
||||
export type PropsType = {
|
||||
id: string;
|
||||
|
@ -22,7 +23,7 @@ export class InlineNotificationWrapper extends React.Component<PropsType> {
|
|||
};
|
||||
|
||||
public handleFocus = (): void => {
|
||||
if (window.getInteractionMode() === 'keyboard') {
|
||||
if (getInteractionMode() === 'keyboard') {
|
||||
this.setSelected();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue