box / box/box-ui-elements

UI elements doesn't work inside the shadow DOM

Open
#2,189 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
551
Forks
351
Avg merge
5d 9h
Merged PRs (30d)
31

Description

Please fill out the following template so we can reproduce and fix your issue as quickly as possible!

**Note:** if your issue includes a potential security vulnerability, please do not file it here. Instead, email the issue to security@box.com for support.

**Note:** if your issue involves previewing files, please report the issue [here](https://github.com/box/box-content-preview/issues/new/choose).

**Environment:**

- Elements version: 11.0.2

**Desktop (please complete the following information):**

- OS: [e.g. Windows 10] Windows 10
- Browser [e.g. chrome, safari] Chrome
- Version [e.g. 22] 83

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Steps to reproduce the problem:**
create a custom element with shadow DOM enabled and put the UI element inside e.g. content explorer

**What is the expected behavior? (Screenshots can be helpful here)**
the ui element should be rendered

**What went wrong? (Screenshots, console logs, or HAR files can be helpful here)**
the ui element is throwing an error TypeError: this.rootElement is null

**Link to application or sample code:**
https://codepen.io/hrobarikt/pen/NWxNqOg

**If relevant, link to file (or attach file here)**

**Expected behavior**
working box ui elements in a web application that is built using web components with shadow DOM enabled

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.