google / google/material-design-lite
Waterfall navigation doesn't scroll + I found CDN material.min.js is running errors
- Dominant language
- HTML
- Stars
- 32.2k
- Forks
- 4.9k
- PR merge metrics
- No merged PRs in 30d
Description
## possible bugs?
> Latest version via CDN. Version 1.3.0
> I'm using Chrome Version 56.0.2924.76 (64-bit)
> macOS Sierra version 10.12.2 (16C67)
>The behavior I expected was that of the demo on MDL site. Where when I scrolled the nav bar would shrink. I tried added content, but it only stretches the page.
> It's sticking with the top of page and when you scroll down it scrolls away. I believe it should be acting as sticky header/nav bar
> When I opened my console log, I found the following:
I'm using this:
And in my console, it's giving me the following errors
```
layout.js:309 Uncaught TypeError: Cannot read property 'addEventListener' of undefined
at f.init (layout.js:309)
at new f (layout.js:28)
at a (mdlComponentHandler.js:241)
at n (mdlComponentHandler.js:192)
at Object._ [as upgradeAllRegistered] (mdlComponentHandler.js:360)
at mdlComponentHandler.js:492
```
Contributor guide
Research direction
Start by reproducing the report with the CDN script https://code.getmdl.io/1.3.0/material.min.js in Chrome, then inspect layout.js around line 309 and the related mdlComponentHandler stack. Compare the navigation behavior with the MDL demo and determine whether the missing element causes the addEventListener error; done means the reported console error and scrolling behavior are addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100