Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle cases when app-drawer is appended later #313

Merged
merged 3 commits into from
Aug 31, 2016
Merged

Conversation

keanulee
Copy link
Contributor

Might fix #273

@keanulee
Copy link
Contributor Author

Actually, this will cause more work if app-drawer is already attached during init - need to revisit

@keanulee keanulee closed this Aug 30, 2016
@keanulee keanulee reopened this Aug 30, 2016
@frankiefu
Copy link
Contributor

We might want to handle for the case when app-drawer is upgraded (e.g. lazy import) later.

@keanulee
Copy link
Contributor Author

@frankiefu Does lazy import mean the custom attached callback is run after the element is customized? If so, then it should Just WorkTM.

@frankiefu
Copy link
Contributor

Yeah. Just tried out one of the app-drawer-layout demo and noticed couple things:

  • this.drawer may return <app-drawer> but hasn't been upgraded yet, so at load time it tries to call this.drawer.getWidth() and that generates an error.
  • because of the error above, resetLayout didn't setup the layout correctly.

@frankiefu
Copy link
Contributor

LGTM

@milky2028
Copy link

Hello! I'm currently having this issue using Polymer 2, though it says here it's been resolved. I updated my dependencies, but the issue persists.

@milky2028
Copy link

milky2028 commented Oct 11, 2017

This is resulting in the drawer not resetting, so things like

// Close a non-persistent drawer when the page & route are changed.
        if (!this.$.drawer.persistent) {
          this.$.drawer.close();
        } 

don't work properly. The drawer stays open on page changes.

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

Successfully merging this pull request may close these issues.

Uncaught TypeError in polymer-mini.html:2044
4 participants