"Generate password" doesn't work on hybrid pointer devices

Issue #5 resolved
Patrick created an issue

I run Firefox on a laptop with a touchscreen, but always use a mouse. The following code determines which event to listen for on the button, and selects the touchend event on any device with a touchscreen.

var clickEvent = !!("ontouchstart" in window) ? "touchend" : "click";

Unfortunately, this means it's not listening for clicks so the button just doesn't work at all!

Could we change the code to just listen for either event?

var clickEvent = "touchend click";

You'll get double-ups on devices that have both, but that doesn't really matter as you're just generating a new password anyway.

Comments (4)

  1. Log in to comment