sidepanel: prevent focus forced scroll when closed
This commit is contained in:
parent
843bc0a91d
commit
d044601608
4 changed files with 19 additions and 3 deletions
|
|
@ -12,6 +12,8 @@
|
|||
- added notifications
|
||||
- widgets
|
||||
- `matrices`: **new** `patchbay` widget
|
||||
- bug fixes
|
||||
- prevent layout break when hitting tab with sidepanel closed and editor enabled
|
||||
|
||||
## 0.40.5
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<body>
|
||||
<div id="container"></div>
|
||||
<div id="sidepanel"></div>
|
||||
<div id="sidepanel" class="hide"></div>
|
||||
<div id="notifications"></div>
|
||||
</body>
|
||||
|
||||
|
|
|
|||
|
|
@ -227,8 +227,12 @@ function sidepanelOpen() {
|
|||
|
||||
sidepaneLock = true
|
||||
|
||||
DOM.each(document, '#open-toggle, #sidepanel', (el)=>{
|
||||
el.classList.add('sidepanel-open')
|
||||
DOM.get('#sidepanel')[0].classList.remove('hide')
|
||||
|
||||
setTimeout(function(){
|
||||
DOM.each(document, '#open-toggle, #sidepanel', (el)=>{
|
||||
el.classList.add('sidepanel-open')
|
||||
})
|
||||
})
|
||||
|
||||
setTimeout(function(){
|
||||
|
|
@ -249,6 +253,10 @@ function sidepanelClose() {
|
|||
el.classList.remove('sidepanel-open')
|
||||
})
|
||||
|
||||
setTimeout(function(){
|
||||
DOM.get('#sidepanel')[0].classList.add('hide')
|
||||
}, 250)
|
||||
|
||||
setTimeout(function(){
|
||||
DOM.dispatchEvent(window, 'resize')
|
||||
}, 25)
|
||||
|
|
|
|||
|
|
@ -27,6 +27,12 @@
|
|||
opacity: 1;
|
||||
}
|
||||
|
||||
&.hide {
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.navigation {
|
||||
margin-bottom:2rem;
|
||||
margin-left: 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue