diff options
| author | eugenijm <eugenijm@protonmail.com> | 2020-07-23 09:06:50 +0300 |
|---|---|---|
| committer | eugenijm <eugenijm@protonmail.com> | 2020-07-23 09:53:51 +0300 |
| commit | 61dd1a3b4935d0466bfd77e026c19461d62b124f (patch) | |
| tree | 4895a62ea70929a9a96efc25b1be5b4e7838aa03 /src/components/settings_modal/settings_modal.js | |
| parent | dac075c61a33eafa6778d04b9f972dbc1e1dfb57 (diff) | |
Add body 100% width for the preview, refactor the modalActivated watcher, use body scroll lock for the setting tab content
Diffstat (limited to 'src/components/settings_modal/settings_modal.js')
| -rw-r--r-- | src/components/settings_modal/settings_modal.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/components/settings_modal/settings_modal.js b/src/components/settings_modal/settings_modal.js index b6880445..4f54d6a3 100644 --- a/src/components/settings_modal/settings_modal.js +++ b/src/components/settings_modal/settings_modal.js @@ -38,17 +38,14 @@ const SettingsModal = { } }, watch: { + // This is the only way to access the <html> element. modalActivated (newValue) { + let html = document.querySelector('html') + if (!html) return if (newValue) { - let html = document.querySelector('html') - if (html) { - html.classList.add('settings-modal-layout') - } + html.classList.add('settings-modal-layout') } else { - let html = document.querySelector('html') - if (html) { - html.classList.remove('settings-modal-layout') - } + html.classList.remove('settings-modal-layout') } } } |
