Close Stream settings dialog when not clicking on any child elements

This commit is contained in:
redphx
2024-07-18 09:20:40 +07:00
parent 43ef2b7cd0
commit fbebb12965
2 changed files with 13 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@@ -643,6 +643,15 @@ export class StreamSettings {
this.hide();
});
// Close dialog when not clicking on any child elements in the dialog
$container.addEventListener('click', e => {
if (e.target === $container) {
e.preventDefault();
e.stopPropagation();
this.hide();
}
});
for (const settingTab of this.SETTINGS_UI) {
if (!settingTab) {
continue;