Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#8238 Save dialog is not properly displayed in certain cases #8759

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 22 additions & 19 deletions web/client/components/home/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import Message from '../../components/I18N/Message';
import ConfirmModal from '../../components/misc/ResizableModal';
import { get, pick } from "lodash";
import ConfigUtils from "../../utils/ConfigUtils";
import Portal from '../../components/misc/Portal';
export const getPath = () => {
const miscSettings = ConfigUtils.getConfigProp('miscSettings');
return get(miscSettings, ['homePath'], '/');
Expand Down Expand Up @@ -61,25 +62,27 @@ class Home extends React.Component {
{...pick(restProps, ['disabled', 'active', 'block', 'componentClass', 'href', 'children', 'icon', 'bsStyle', 'className'])}
><Glyphicon glyph={this.props.icon}/></Button>
</OverlayTrigger>
<ConfirmModal
ref="unsavedMapModal"
show={this.props.displayUnsavedDialog || false}
onClose={this.props.onCloseUnsavedDialog}
title={<Message msgId="resources.maps.unsavedMapConfirmTitle" />}
buttons={[{
bsStyle: "primary",
text: <Message msgId="resources.maps.unsavedMapConfirmButtonText" />,
onClick: this.goHome
}, {
text: <Message msgId="resources.maps.unsavedMapCancelButtonText" />,
onClick: this.props.onCloseUnsavedDialog
}]}
fitContent
>
<div className="ms-detail-body">
<Message msgId="resources.maps.unsavedMapConfirmMessage" />
</div>
</ConfirmModal>
<Portal>
<ConfirmModal
ref="unsavedMapModal"
show={this.props.displayUnsavedDialog || false}
onClose={this.props.onCloseUnsavedDialog}
title={<Message msgId="resources.maps.unsavedMapConfirmTitle" />}
buttons={[{
bsStyle: "primary",
text: <Message msgId="resources.maps.unsavedMapConfirmButtonText" />,
onClick: this.goHome
}, {
text: <Message msgId="resources.maps.unsavedMapCancelButtonText" />,
onClick: this.props.onCloseUnsavedDialog
}]}
fitContent
>
<div className="ms-detail-body">
<Message msgId="resources.maps.unsavedMapConfirmMessage" />
</div>
</ConfirmModal>
</Portal>
</React.Fragment>
);
}
Expand Down