fix: fullscreen targets dashboard container instead of entire page

This commit is contained in:
yumoqing 2026-06-01 16:09:05 +08:00
parent 966c89080b
commit bf5cf2b1b2

View File

@ -1,6 +1,7 @@
{% set roles = get_user_roles(get_user()) %} {% set roles = get_user_roles(get_user()) %}
{ {
"widgettype": "VBox", "widgettype": "VBox",
"id": "dashboard_root",
"options": { "options": {
"width": "100%", "width": "100%",
"height": "100%" "height": "100%"
@ -55,7 +56,7 @@
"event": "click", "event": "click",
"actiontype": "script", "actiontype": "script",
"target": "self", "target": "self",
"script": "if (!document.fullscreenElement) { document.documentElement.requestFullscreen(); } else { document.exitFullscreen(); }" "script": "var el = document.getElementById('dashboard_root'); if (!document.fullscreenElement) { (el || document.documentElement).requestFullscreen(); } else { document.exitFullscreen(); }"
} }
] ]
} }