mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-28 12:19:10 +03:00
Fix regression: close media modal, not the status page
Clicking close goes *back* from media=1 to media-only=1
This commit is contained in:
parent
950114b9f7
commit
8efc7a226e
1 changed files with 4 additions and 1 deletions
|
@ -119,7 +119,10 @@ function StatusPage(params) {
|
||||||
instance={instance}
|
instance={instance}
|
||||||
index={mediaIndex - 1}
|
index={mediaIndex - 1}
|
||||||
onClose={() => {
|
onClose={() => {
|
||||||
if (snapStates.prevLocation) {
|
if (
|
||||||
|
!window.matchMedia('(min-width: calc(40em + 350px))').matches &&
|
||||||
|
snapStates.prevLocation
|
||||||
|
) {
|
||||||
history.back();
|
history.back();
|
||||||
} else {
|
} else {
|
||||||
if (showMediaOnly) {
|
if (showMediaOnly) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue