Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

MDCDrawer can't find the scrim when initialising the element inside the Shadow DOM #4254

Closed
vedtam opened this issue Jan 16, 2019 · 2 comments
Labels

Comments

@vedtam
Copy link

vedtam commented Jan 16, 2019

Hi,

While trying to implement the modal version of the MDCDrawer, I hit the following exception:

screen shot 2019-01-16 at 17 29 32

I've created a demonstration here, you can find the source here.

Any idea?
Thanks.

@acdvorak
Copy link
Contributor

Thanks for filing this issue!

We can probably fix this in MDC by changing parentElement to parentNode (and adding a unit test that moves the DOM into a document fragment).

Until then, you can work around this problem by wrapping the
<aside class="mdc-drawer mdc-drawer--modal"> element in an extra <div>:

@vedtam
Copy link
Author

vedtam commented Jan 18, 2019

Thanks for the workaround @acdvorak! And thanks for the nice explanation, gonna follow the subject.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants