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

fix(demos): Fix NPEs in drawer demos #1946

Merged
merged 4 commits into from
Jan 16, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demos/drawer/permanent-drawer-above-toolbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ <h1 class="mdc-typography--display1">Permanent Drawer</h1>
var activatedClass = 'mdc-list-item--selected';
document.querySelector('.mdc-drawer').addEventListener('click', function(event) {
var el = event.target;
while (!el.classList.contains('mdc-list-item') && el) {
el = el.parentNode;
while (el && !el.classList.contains('mdc-list-item')) {
el = el.parentElement;
}
if (el) {
var activatedItem = document.querySelector('.' + activatedClass);
Expand Down
4 changes: 2 additions & 2 deletions demos/drawer/permanent-drawer-below-toolbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ <h1 class="mdc-typography--display1">Permanent Drawer</h1>
var activatedClass = 'mdc-list-item--selected';
document.querySelector('.mdc-drawer').addEventListener('click', function(event) {
var el = event.target;
while (!el.classList.contains('mdc-list-item') && el) {
el = el.parentNode;
while (el && !el.classList.contains('mdc-list-item')) {
el = el.parentElement;
}
if (el) {
var activatedItem = document.querySelector('.' + activatedClass);
Expand Down
4 changes: 2 additions & 2 deletions demos/drawer/persistent-drawer.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ <h1 class="mdc-typography--display1">Persistent Drawer</h1>
var activatedClass = 'mdc-list-item--selected';
document.querySelector('.mdc-drawer__drawer').addEventListener('click', function(event) {
var el = event.target;
while (!el.classList.contains('mdc-list-item') && el) {
el = el.parentNode;
while (el && !el.classList.contains('mdc-list-item')) {
el = el.parentElement;
}
if (el) {
var activatedItem = document.querySelector('.' + activatedClass);
Expand Down
4 changes: 2 additions & 2 deletions demos/drawer/temporary-drawer.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ <h1 class="mdc-typography--display1">Temporary Drawer</h1>
var activatedClass = 'mdc-list-item--selected';
document.querySelector('.mdc-drawer__drawer').addEventListener('click', function(event) {
var el = event.target;
while (!el.classList.contains('mdc-list-item') && el) {
el = el.parentNode;
while (el && !el.classList.contains('mdc-list-item')) {
el = el.parentElement;
}
if (el) {
var activatedItem = document.querySelector('.' + activatedClass);
Expand Down