54570 manual backport (#54716)

This commit is contained in:
Dominik Prokop
2022-09-05 17:18:50 +02:00
committed by GitHub
parent 6f255cb089
commit 6e300048ed
@@ -1,4 +1,3 @@
import { FocusScope } from '@react-aria/focus';
import classnames from 'classnames';
import React, { PureComponent } from 'react';
import { connect, ConnectedProps } from 'react-redux';
@@ -407,13 +406,7 @@ export class UnthemedDashboardPage extends PureComponent<Props, State> {
<DashboardGrid dashboard={dashboard} viewPanel={viewPanel} editPanel={editPanel} />
{inspectPanel && <PanelInspector dashboard={dashboard} panel={inspectPanel} />}
{editPanel && (
<FocusScope contain autoFocus restoreFocus>
<section>
<PanelEditor dashboard={dashboard} sourcePanel={editPanel} tab={this.props.queryParams.tab} />
</section>
</FocusScope>
)}
{editPanel && <PanelEditor dashboard={dashboard} sourcePanel={editPanel} tab={this.props.queryParams.tab} />}
{queryParams.editview && <DashboardSettings dashboard={dashboard} editview={queryParams.editview} />}
</Page>
);