1
0
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:
Dick Choi
2016-06-07 10:48:41 +09:00
parent 4299baec5d
commit 1c224fedc5
2 changed files with 7 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ class ModalBase extends React.Component {
close () {
if (modalBase != null) modalBase.setState({component: null, componentProps: null, isHidden: true})
document.body.setAttribute('data-modal', 'close')
remote.getCurrentWebContents().send('list-focus')
}
@@ -37,6 +38,8 @@ let modalBase = ReactDOM.render(<ModalBase/>, el)
export function openModal (component, props) {
if (modalBase == null) { return }
document.body.setAttribute('data-modal', 'open')
modalBase.setState({component: component, componentProps: props, isHidden: false})
}

View File

@@ -23,6 +23,10 @@ body
font-size fontSize
font-weight 400
body[data-modal="open"]
#content *
overflow hidden !important
button, input, select, textarea
font-family DEFAULT_FONTS