mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Fix the Stream Settings doesn't hide when clicking outside
This commit is contained in:
parent
fd127cf2fa
commit
5ce311f873
@ -9470,7 +9470,7 @@ function injectStreamMenuButtons() {
|
||||
}
|
||||
|
||||
$btnCloseHud && $btnCloseHud.addEventListener('click', e => {
|
||||
$quickBar.classList.add('bx-none');
|
||||
$quickBar.classList.add('bx-gone');
|
||||
});
|
||||
|
||||
// Get "Quit game" button
|
||||
@ -9578,6 +9578,19 @@ function showStreamSettings(tabId) {
|
||||
}
|
||||
|
||||
$wrapper.classList.remove('bx-gone');
|
||||
|
||||
const $screen = document.querySelector('#PageContent section[class*=PureScreens]');
|
||||
if ($screen && !$screen.parentElement.bxClick) {
|
||||
$screen.parentElement.bxClick = true;
|
||||
|
||||
const onClick = e => {
|
||||
$wrapper.classList.add('bx-gone');
|
||||
$screen.parentElement.bxClick = false;
|
||||
$screen.parentElement.removeEventListener('click', onClick);
|
||||
};
|
||||
|
||||
$screen.parentElement.addEventListener('click', onClick);
|
||||
}
|
||||
}
|
||||
|
||||
function patchVideoApi() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user