diff --git a/browser/lib/modal.js b/browser/lib/modal.js index 7e330178..6dcf0638 100644 --- a/browser/lib/modal.js +++ b/browser/lib/modal.js @@ -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(, el) export function openModal (component, props) { if (modalBase == null) { return } + + document.body.setAttribute('data-modal', 'open') modalBase.setState({component: component, componentProps: props, isHidden: false}) } diff --git a/browser/styles/main/index.styl b/browser/styles/main/index.styl index 434e91a5..1f737a84 100644 --- a/browser/styles/main/index.styl +++ b/browser/styles/main/index.styl @@ -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