Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 72c0434

Browse files
committed
chore: Merge branch 'dev'
2 parents 1a5d690 + fb9a2c4 commit 72c0434

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

containers/Preview/store.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { types as t, getParent } from 'mobx-state-tree'
77
import R from 'ramda'
88

99
import { TYPE, THREAD } from '@constant'
10-
import { markStates, stripMobx, unholdPage, Global, cs } from '@utils'
10+
import { markStates, stripMobx, holdPage, unholdPage, Global, cs } from '@utils'
1111
import { User, EmptyAchievement } from '@model'
1212

1313
const PREVIEWABLE_THREADS = [THREAD.POST, THREAD.JOB, THREAD.VIDEO, THREAD.REPO]
@@ -121,6 +121,7 @@ const PreviewStore = t
121121

122122
self.visible = true
123123
self.type = type
124+
holdPage()
124125
},
125126
setViewing(sobj) {
126127
self.root.setViewing(sobj)

utils/dom_operator.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ export const holdPage = () => {
3737

3838
if (safeDocument) {
3939
const el = safeDocument.getElementById('body')
40-
// el.style.overflowY = 'hidden'
41-
el.style.position = 'fixed'
40+
el.style.overflowY = 'hidden'
41+
/* el.style.position = 'fixed' */
4242
}
4343
}
4444

@@ -47,8 +47,8 @@ export const unholdPage = () => {
4747

4848
if (safeDocument) {
4949
const el = safeDocument.getElementById('body')
50-
/* el.style.overflowY = 'auto' */
51-
el.style.position = ''
50+
el.style.overflowY = 'auto'
51+
/* el.style.position = '' */
5252
}
5353
}
5454

0 commit comments

Comments
 (0)