"Generate password" doesn't work on hybrid pointer devices
Issue #5
resolved
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)
-
reporter -
reporter - edited description
-
reporter I've made a pull request to fix the bug:
-
repo owner - changed status to resolved
This was fixed in PR 2 and has been deployed to production
- Log in to comment
For reference, here's where the change would need to be made:
https://bitbucket.org/jvdl/correcthorsebatterystaple/src/f89b765a13751f8758eb5c14c7fb4ba66868b9a1/js/main.js?at=master&fileviewer=file-view-default#main.js-324