Fix(Web): exit remote-desktop fullscreen blocks device-list clicks
This commit is contained in:
@@ -1873,6 +1873,24 @@
|
||||
}
|
||||
|
||||
function showPage(pageId) {
|
||||
// Leaving the remote-desktop page? Drop fullscreen first.
|
||||
// #screen-page is the requestFullscreen target; while it remains
|
||||
// the document.fullscreenElement the browser blocks pointer /
|
||||
// keyboard interaction with anything outside its subtree —
|
||||
// devices-page lives outside it, so without this exit a click
|
||||
// ANYWHERE on the device list silently no-ops until the user
|
||||
// hits ESC themselves. Same hazard for device_offline auto-
|
||||
// navigation, manual Back, and any future navigation we add.
|
||||
if (pageId !== 'screen-page') {
|
||||
const sp = document.getElementById('screen-page');
|
||||
if (sp && sp.classList.contains('active')) {
|
||||
if (document.fullscreenElement || document.webkitFullscreenElement) {
|
||||
const exit = document.exitFullscreen || document.webkitExitFullscreen;
|
||||
if (exit) exit.call(document).catch(() => {});
|
||||
}
|
||||
sp.classList.remove('pseudo-fullscreen'); // iOS fallback path
|
||||
}
|
||||
}
|
||||
document.querySelectorAll('.page').forEach(p => p.classList.remove('active'));
|
||||
document.getElementById(pageId).classList.add('active');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user