Merge branch 'collapse-user-control' into 'circle-css'

added listener to collapse user control

See merge request startinblox/applications/sib-app!79
This commit is contained in:
Jean-Baptiste Pasquier 2019-11-15 13:02:08 +00:00
commit bae6838ca4

View File

@ -81,6 +81,12 @@ document.addEventListener('DOMContentLoaded', function (event) {
}
}).catch(error => console.log(error));
// Document -> close menu
document.addEventListener("click", event => {
if (!event.target.closest('#user-controls')) {
let userControls = this.querySelector('#user-controls');
if (userControls) userControls.removeAttribute("open");
}
});
});