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

Toggle _onTap should stop event propagation. #141

Open
alexdeefuse opened this issue Apr 13, 2016 · 1 comment
Open

Toggle _onTap should stop event propagation. #141

alexdeefuse opened this issue Apr 13, 2016 · 1 comment

Comments

@alexdeefuse
Copy link

Hi,

I've been trying to use the paper-drawer-panel inside another paper-drawer-panel.
Everything works well except the toggle tap functionality. When the inner paper-drawer-panel toggle is tapped, both drawer panels react to that event.

What needs to be done is:

_onTap: function(event) {
    var targetElement = Polymer.dom(event).localTarget;
    var isTargetToggleElement = targetElement &&
        this.drawerToggleAttribute &&
        targetElement.hasAttribute(this.drawerToggleAttribute);
    if (isTargetToggleElement) {
        // this should be added.
        e.stopPropagation();
        e.preventDefault();

        this.togglePanel();
    }
},
@blasten
Copy link
Contributor

blasten commented Apr 19, 2016

probably just stopPropagation(). Feel free to send a PR with the unit test. Thanks!

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

No branches or pull requests

2 participants