A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/naver/hammer.js/issues/21 below:

Event target is different for tap vs press when used in Polymer/shadow-dom · Issue #21 · naver/hammer.js · GitHub

I originally opened issue #18 regarding the behavior I was seeing but realized the issue was with how I was debugging. Now that I have that straightened out, I think I see the real issue that is tripping up VisJs Timeline.

In the simple test case I attached, I get different targets in the event for press vs tap. For press, the event target appears to be properly set to the inner element that is actually pressed. For tap, the event target appears to be set to the outer container element that Hammer is associated with.

I'm not sure which behavior is "correct", but it seems odd that they are different. From a simple example using the original Hammer it looks like the inner element should always be the target. This is what is tripping up VisJs Timeline. When pressing it can determine the actual child item pressed. When tapping, it doesn't get the actual child element so selection functionality doesn't work.

I assume this is related to being inside a Polymer element/shadow-dom because the simple example (linked above) seems to work fine. However I haven't found the smoking gun of how Polymer would be interfering with element selection or why it would only affect tap and not press.

Hopefully this is a real issue unlike the last one I opened :)

start-polymer3.zip


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4