You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@guacamole.apache.org by "Jonas Zeiger (Jira)" <ji...@apache.org> on 2020/01/07 11:45:00 UTC
[jira] [Created] (GUACAMOLE-918) Guacamole Display not visible
under Shadow DOM
Jonas Zeiger created GUACAMOLE-918:
--------------------------------------
Summary: Guacamole Display not visible under Shadow DOM
Key: GUACAMOLE-918
URL: https://issues.apache.org/jira/browse/GUACAMOLE-918
Project: Guacamole
Issue Type: Bug
Components: guacamole-common-js
Affects Versions: 1.1.0
Environment: guacamole-common-js 1.1.0 on Chromium 78
org.apache.guacamole:guacamole-common:1.0.0 on OpenJDK 11
Reporter: Jonas Zeiger
Attachments: guacamole-display-under-shadow-root.png
The Guacamole display doesn't show when inserted under shadow DOM.
The display is attached like this:
{code:javascript}
const wrapper = this.shadowRoot.getElementById('console-screen-wrapper');
wrapper.style.width = '' + 640 + 'px';
wrapper.style.height = '' + 480 + 'px';
this.display = wrapper.appendChild(client.getDisplay().getElement());
{code}
The display elements including canvas are present in the DOM (see DOM screenshot).
The reason seems to be the explicit canvas/layer z-index setup here:
guacamole-common.js, Guacamole.Layer()
{code:javascript}
// Explicitly render canvas below other elements in the layer (such as
// child layers). Chrome and others may fail to render layers properly
// without this.
canvas.style.zIndex = -1;
{code}
Setting canvas.style.zIndex to 0 instead of -1 makes all layers visible under shadow DOM.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)