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

Polymer.dom(event).localTarget returns undefined #2374

Closed
urandom opened this issue Aug 26, 2015 · 2 comments
Closed

Polymer.dom(event).localTarget returns undefined #2374

urandom opened this issue Aug 26, 2015 · 2 comments
Assignees
Labels

Comments

@urandom
Copy link

urandom commented Aug 26, 2015

Under certain conditions, calling Polymer.dom(event).localTarget returns undefined. I was under the assumption that the property will always be defined, so if that's not the case, please close this issue. The conditions I noticed this in are a bit specific for me, though I think the 'dom-if' element is most likely the cause of it. This is essentially what I have:

<my-custom-scaffold>
<paper-drawer-panel>
   <paper-header-panel drawer>
     ...
  </paper-header-panel>

   <paper-header-panel main>
     <paper-toolbar>
      <template is="dom-if" if="[[ narrow ]]" restamp>
        <content select=".main-title"></content>
      </template>
    </paper-toolbar>
   <div class="content">
       <template is="dom-if" if="[[ !narrow ]]" restamp>
        <content select=".main-title"></content>
      </template>
   </div>
  </paper-header-panel>
</paper-drawer-panel>
</my-custom-scaffold>
<my-custom-scaffold>
   <div class="main-title">
       <paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button>
   </div>
</my-custom-scaffold>

Essentially the paper-drawer-toggle didn't do anything because the _onTap listener in the drawer-panel did get a valid localTarget.

@jaichandra
Copy link

jaichandra commented Feb 27, 2017

This is definitely a bug with ShadyDOM.
#1921 (comment)

@TimvdLippe
Copy link
Contributor

Thanks for the issue. It has been a great while since this issue was opened. Sadly, this issue misses a live reproduction with Polymer 2 for us to be able to debug and potentially fix. Polymer 2 fixes a large amount of issues, probably including this one as well.

Please see CONTRIBUTING.md for guidelines on filing issues. You can start from this jsBin template as a starting point and link it in the issue template under "Live Demo".

Feel free to file a new issue following these instructions if you can still reproduce this issue with Polymer 2. Thank you!

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

No branches or pull requests

6 participants