sidepanel: prevent focus forced scroll when closed
This commit is contained in:
parent
57b65d73e4
commit
0d53b5acaf
4 changed files with 19 additions and 3 deletions
|
|
@ -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