commit melhorias sgf
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
const menus=[...document.querySelectorAll('.module-choice')];
|
||||
for(const menu of menus){menu.addEventListener('toggle',()=>{if(menu.open)for(const other of menus)if(other!==menu)other.open=false;});menu.addEventListener('keydown',event=>{if(event.key==='Escape'){menu.open=false;menu.querySelector('summary').focus();}});}
|
||||
document.addEventListener('pointerdown',event=>{if(!event.target.closest('.module-choices'))for(const menu of menus)menu.open=false;});
|
||||
Reference in New Issue
Block a user