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

Have paper-ripple respect preventDefault #30

Open
broken opened this issue Jul 24, 2015 · 1 comment
Open

Have paper-ripple respect preventDefault #30

broken opened this issue Jul 24, 2015 · 1 comment

Comments

@broken
Copy link

broken commented Jul 24, 2015

I believe there shouldn't be a ripple effect if preventDefault() was previously called on the event. This would allow the developer to cancel the event and later ripples without stopping further propagation of the event.

This would solve having interactable elements on top of objects that have ripple effects. In my case, I have a list of selectable objects, each with their own options button (similar in style to Google Play Music if you could select songs).
Example showing the problem:
http://jsbin.com/belejomipe/1/edit?html,output
Example showing it fixed:
http://jsbin.com/qosuwofijo/1/edit?html,output

Calling stopPropagation() on the event could accomplish this, but the dangers are well documented (https://css-tricks.com/dangers-stopping-event-propagation/), and my app does contain menus that require the event to propagate to correctly close.

I'm happy to create a PR of my current fix/hack (https://github.com/broken/paper-ripple/commit/7a6689acecb7187e234b6c14a6497d750bdb2b61).

@isaldarriaga
Copy link

try this: #90

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

3 participants