Fix Quick glancing activated when using Touch control dialog

This commit is contained in:
redphx 2024-10-06 20:16:08 +07:00
parent 9719454ea1
commit 203346c0a1

View File

@ -129,14 +129,17 @@ export class StreamStats {
} }
this.quickGlanceObserver = new MutationObserver((mutationList, observer) => { this.quickGlanceObserver = new MutationObserver((mutationList, observer) => {
for (let record of mutationList) { for (const record of mutationList) {
if (record.attributeName && record.attributeName === 'aria-expanded') { const $target = record.target as HTMLElement;
const expanded = (record.target as HTMLElement).ariaExpanded; if (!$target.className || !$target.className.startsWith('GripHandle')) {
if (expanded === 'true') { continue;
this.isHidden() && this.start(true); }
} else {
this.stop(true); const expanded = (record.target as HTMLElement).ariaExpanded;
} if (expanded === 'true') {
this.isHidden() && this.start(true);
} else {
this.stop(true);
} }
} }
}); });