paper-ripple is listening to click events outside of its container
NickName:Derek 朕會功夫 Ask DateTime:2015-06-11T06:40:39

paper-ripple is listening to click events outside of its container

I'm trying to create a simple ripple effect for a card in my app. It works great, but it is also responding to mouse events outside of its container:

enter image description here

Code looks like this:

<dom-module>
    ...
    <template>
        ...
        <paper-material>
            <div class="wrapper">...</div>
            <paper-ripple></paper-ripple>
        </paper-material>
        ...
    </template>
</dom-module>

I don't quite see why it is behaving this way. Any idea?


Added

This whole page is an independant dom-module. Apparently using paper-ripple in such a fashion causes this to happen. How do I fix this?

Copyright Notice:Content Author:「Derek 朕會功夫」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/30768536/paper-ripple-is-listening-to-click-events-outside-of-its-container

More about “paper-ripple is listening to click events outside of its container” related questions

paper-ripple is listening to click events outside of its container

I'm trying to create a simple ripple effect for a card in my app. It works great, but it is also responding to mouse events outside of its container: Code looks like this: &lt;dom-module&gt; ...

Show Detail

Polymer paper-ripple and on-mouseover

I am trying to implement my own custom tooltip element, which displays the tooltip when the on-mouseover event is fired. However, this does not work: &lt;div class="message&gt; &lt;custom-too...

Show Detail

Docker listening in container but not answering outside, why?

I have a docker container built with "EXPOSE 8000" among its instructions. I started the process like this: sudo docker run -t -i -P imagename The process in the container is listening on 8000. #

Show Detail

paper-ripple mouseDown event handler downAction Override

Polymer 1.1 In paper ripple source code they have the mouseDown event handler: /** @param {Event=} event */ downAction: function(event) { var xCenter = this.containerMetrics.width / 2; ...

Show Detail

Paper-ripple going all over screen instead of being contained within my element?

Am I doing something wrong here? For some reason my paper-ripple is happening when I click anywhere on the screen rather than just the image it's below? Did I mess up the syntax? The documentation ...

Show Detail

Click outside to hide container with button

I am using the following Angular directive to hide div elements when the user clicks or touches outside. https://github.com/TheSharpieOne/angular-off-click It is working as expected but when you ...

Show Detail

paper-ripple prevents click on container element and doesn't fit

Here is the partial code to which i'm troubled. &lt;core-toolbar id="main-toolbar" horizontal layout&gt; &lt;core-icon-button icon="menu" class="bottom" core-drawer-toggle&gt;

Show Detail

Polymer paper-ripple disable/enable animation dynamically

With Polymer 1.1... using &lt;paper-ripple fit&gt;&lt;paper-ripple&gt; how can I enable/disable the animation dynamically? &lt;template&gt; &lt;section class="relative enabledHover"

Show Detail

Dockerized Aurelia App Is Not Visible Outside of Docker Container - Not listening on 0.0.0.0

I'm running an Aurelia app inside of the standard node docker container and it is listening on port 8080. Within the container, I have tested that it's running using curl; and it responds with the

Show Detail

Configuring paper-ripple with "opacityDecayVelocity" attribute

The default timing set by paper ripple animation 0.8s makes the transition seem slower. Tried changing the value via : &lt;paper-ripple opacityDecayVelocity ="1.0"&gt;&lt;/paper-ripple&gt; Addin...

Show Detail