Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions src/components/Viewer/FilesViewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ const styleStatusBar = switcher => {
}
}

// Keep the Dialog behind the others Dialogs
const viewerStyle = { zIndex: 'calc(var(--zIndex-modal) - 1)' }

const FilesViewer = ({ filesQuery, files, fileId, onClose, onChange }) => {
const [currentFile, setCurrentFile] = useState(null)
const [fetchingMore, setFetchingMore] = useState(false)
Expand Down Expand Up @@ -122,6 +125,12 @@ const FilesViewer = ({ filesQuery, files, fileId, onClose, onChange }) => {

return (
<Viewer
componentsProps={{
modalProps: {
open: true,
style: viewerStyle
}
}}
files={viewerFiles}
currentIndex={viewerIndex}
onChangeRequest={handleOnChange}
Expand Down
4 changes: 0 additions & 4 deletions src/components/Views/InformationEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ import Spinner from 'cozy-ui/transpiled/react/Spinner'
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'

// Keep the Dialog above the Viewer
const fixedDialogStyle = { zIndex: 'var(--zIndex-modal-footer)' }

const InformationEdit = () => {
const { fileId } = useParams()
const client = useClient()
Expand Down Expand Up @@ -112,7 +109,6 @@ const InformationEdit = () => {
<FixedDialog
open
onClose={onClose}
style={fixedDialogStyle}
title={dialogTitle}
content={
<div
Expand Down
Loading