mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
hide scroll bar when modal shows up
This commit is contained in:
@@ -15,6 +15,7 @@ class ModalBase extends React.Component {
|
|||||||
|
|
||||||
close () {
|
close () {
|
||||||
if (modalBase != null) modalBase.setState({component: null, componentProps: null, isHidden: true})
|
if (modalBase != null) modalBase.setState({component: null, componentProps: null, isHidden: true})
|
||||||
|
document.body.setAttribute('data-modal', 'close')
|
||||||
|
|
||||||
remote.getCurrentWebContents().send('list-focus')
|
remote.getCurrentWebContents().send('list-focus')
|
||||||
}
|
}
|
||||||
@@ -37,6 +38,8 @@ let modalBase = ReactDOM.render(<ModalBase/>, el)
|
|||||||
|
|
||||||
export function openModal (component, props) {
|
export function openModal (component, props) {
|
||||||
if (modalBase == null) { return }
|
if (modalBase == null) { return }
|
||||||
|
|
||||||
|
document.body.setAttribute('data-modal', 'open')
|
||||||
modalBase.setState({component: component, componentProps: props, isHidden: false})
|
modalBase.setState({component: component, componentProps: props, isHidden: false})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,10 @@ body
|
|||||||
font-size fontSize
|
font-size fontSize
|
||||||
font-weight 400
|
font-weight 400
|
||||||
|
|
||||||
|
body[data-modal="open"]
|
||||||
|
#content *
|
||||||
|
overflow hidden !important
|
||||||
|
|
||||||
button, input, select, textarea
|
button, input, select, textarea
|
||||||
font-family DEFAULT_FONTS
|
font-family DEFAULT_FONTS
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user