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

www.beaconreader.com - can't delete digits in "amount" field #2415

Closed
hallvors opened this issue Apr 1, 2016 · 6 comments
Closed

www.beaconreader.com - can't delete digits in "amount" field #2415

hallvors opened this issue Apr 1, 2016 · 6 comments

Comments

@hallvors
Copy link

hallvors commented Apr 1, 2016

URL: https://www.beaconreader.com/projects/facts-not-fear-the-truth-about-encryption/back
Browser / Version: Firefox Mobile 46.0
Operating System: Android
Problem type: Something else - I'll add details below

Steps to Reproduce

  1. Navigate to: https://www.beaconreader.com/projects/facts-not-fear-the-truth-about-encryption/back
  2. Choose the "No thanks, I just want to make a pledge" radio button
  3. Focus text field for amount
  4. Try to use backspace

Expected Behavior:
Able to delete
Actual Behavior:
Nothing happens

@hallvors hallvors changed the title www.beaconreader.com - see bug description www.beaconreader.com - can't delete digits in "amount" field Apr 1, 2016
@hallvors
Copy link
Author

hallvors commented Apr 1, 2016

$('.amount').keypress(function(e) {
var a = [];
var k = e.which;
for (i = 48; i < 58; i++)
a.push(i);
if (!(a.indexOf(k)>=0))
e.preventDefault();
});

This code intends to disallow anything but digits.
The underlying incompatibility is the fact Firefox sends a keypress event for the backspace key. Test here: http://unixpapa.com/js/testkey.html

@hallvors
Copy link
Author

hallvors commented Apr 1, 2016

I've reported https://bugzilla.mozilla.org/show_bug.cgi?id=1261309 but we may also reach out to them and suggest changing their JS to include backspace (key 8) in the array of allowed keys.

@adamopenweb
Copy link
Collaborator

The team members are all listed on the site. Reaching out to one of them: https://twitter.com/AdamOpenWeb/status/715912632910356480

@sagrid
Copy link

sagrid commented Apr 4, 2016

If that counts, works on latest ff 45.

@adamopenweb
Copy link
Collaborator

No response on Twitter. We will have to try another contact.

@wisniewskit
Copy link
Member

This is actually a dupe of bug 968056, so marking it as such.

@karlcow karlcow added this to the duplicate milestone Oct 31, 2017
@karlcow karlcow closed this as completed Oct 31, 2017
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

6 participants