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

on-tap handlers sometimes can't .click() a related input #112

Open
1 of 8 tasks
FLamparski opened this issue Apr 13, 2016 · 5 comments
Open
1 of 8 tasks

on-tap handlers sometimes can't .click() a related input #112

FLamparski opened this issue Apr 13, 2016 · 5 comments

Comments

@FLamparski
Copy link

Description

When using the tap event and tapping the button on a touchscreen PC, a linked file input is not triggered. This happens both inside a custom component and outside of it.

Expected outcome

Normally, the event handler should be able to trigger a file input to show the file browser from both a click and touch event.

In the first demo, tapping the paper-button should trigger the file browser twice because both click and tap are bound.

Actual outcome

In a component, a tap does not trigger the file input even though the event handler runs. In the first demo, a tap does not trigger the file input even though the click does.

Oddly enough Android is not affected by this.

Live Demo

Demo 1: http://codepen.io/FLamparski/pen/reJqwm

Additional things I tried when trying to isolate the bug (all trigger the file input): http://codepen.io/FLamparski/pen/MyVKVN

Steps to reproduce

  1. Use a paper-button
  2. Set up its on-tap event or bind to its click and tap events
  3. Tap on the paper-button on a PC touchscreen

Browsers Affected

  • Chrome
  • Firefox
  • Safari 9 - unknown, but a similar WebKit-based Ubuntu browser is affected
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10
@keanulee
Copy link
Contributor

@FLamparski What "touchscreen PC" are you using (e.g. Surface Pro with Windows 10, or Chromebook Pixel), and is this Chrome only, or does it happen in IE/Edge/Firefox as well?

@FLamparski
Copy link
Author

Hi, I'm using an older Dell XPS 15 with Ubuntu. Tested with Chrome beta and
the Ubuntu browser which is WebKit based. Further, the problem occurs both
under shadow and shady DOM.

On Fri, 15 Apr 2016 23:11 Keanu Lee, [email protected] wrote:

@FLamparski https://github.com/FLamparski What "touchscreen PC" are you
using (e.g. Surface Pro with Windows 10, or Chromebook Pixel), and is this
Chrome only, or does it happen in IE/Edge/Firefox as well?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#112 (comment)

@keanulee
Copy link
Contributor

I wonder if there's some restriction that blocks fileInput.click() when it's not called from a user interaction. What happens when you do bind the listener to only one event ('tap' or 'click') to a regular <div> element? To a <button> element?

@FLamparski
Copy link
Author

Please look at the second codepen linked, which tries to make such explorations

@keanulee
Copy link
Contributor

Due to my lack of access to such hardware, I am unable to reproduce this. If someone else can look into this it would be greatly appreciated.

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