Skip to content

Commit

Permalink
Close settings menu when opening desktop settings
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed May 25, 2024
1 parent b5876ef commit d87dce3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/menu-bar/menu-bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ class MenuBar extends React.Component {
'handleClickSave',
'handleClickSaveAsCopy',
'handleClickPackager',
'handleClickDesktopSettings',
'handleClickRestorePoints',
'handleClickSeeCommunity',
'handleClickShare',
Expand Down Expand Up @@ -269,6 +270,10 @@ class MenuBar extends React.Component {
this.props.onClickPackager();
this.props.onRequestCloseFile();
}
handleClickDesktopSettings () {
this.props.onClickDesktopSettings();
this.props.onRequestCloseSettings();
}
handleClickRestorePoints () {
this.props.onClickRestorePoints();
this.props.onRequestCloseFile();
Expand Down Expand Up @@ -537,7 +542,10 @@ class MenuBar extends React.Component {
canChangeLanguage={this.props.canChangeLanguage}
canChangeTheme={this.props.canChangeTheme}
isRtl={this.props.isRtl}
onClickDesktopSettings={this.props.onClickDesktopSettings}
onClickDesktopSettings={
this.props.onClickDesktopSettings &&
this.handleClickDesktopSettings
}
// eslint-disable-next-line react/jsx-no-bind
onOpenCustomSettings={this.props.onClickAddonSettings.bind(null, 'editor-theme3')}
onRequestClose={this.props.onRequestCloseSettings}
Expand Down

0 comments on commit d87dce3

Please sign in to comment.