Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6242061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:52:58+00:00 2026-05-24T11:52:58+00:00

Event keypress 13 and 10 not working on iPhone safari, android firefox but working

  • 0

Event keypress 13 and 10 not working on iPhone safari, android firefox but working with android default browser.

I have a jsp page which has a form which that takes a number as input and changes values of other div elements in the same page by dividing those numbers by this input.

I am using keypress function of jQuery and testing with keycode 10 and 13 for this. It’s working on all desktop browsers but the GO button doesn’t fire on safari and firefox on smart phones. Please let me know how to go about this?

Here is the partial code I have used:

$('.number').keypress(function(e) {
    if(e.keyCode == 10 || e.keyCode == 13 ) {

        $('#1').html((textreplace/input).toFixed(0)+'g');
        $('#2').html((textreplace2/input).toFixed(0)+'%');
        $('#3').html((textreplace3/input).toFixed(0)+'g');
        ...
        ..

    }
}

The “.number” is the class name used in the input form which has type=”text”. So, basically I am not using submit at all.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:52:59+00:00Added an answer on May 24, 2026 at 11:52 am

    Try using keyup and keydown. keypress event is not really ideal.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have checked in FireFox Firebug and found that Keypress event is not attached
I am using this code but keypress event not working <script type=text/javascript> $(document).ready(function() {
Right now I have the following code working: @UiHandler(usernameTextBox) void onUsernameTextBoxKeyPress(KeyPressEvent event) { keyPress(event);
I have read jQuery Event Keypress: Which key was pressed? and How can i
How to stop keypress event in keydown . I have a keydown handler in
I have managed to make the script below working in Firefox 12.0 . IE
How to cancel a keypress event in a textbox after pressing the return key.
I am trying to add an KeyPress event in a textbox (WinForm) this.textBox1.KeyPress +=
I am using the class pasted below to listen for the keypress event ctrl
when we press a key and keep pressing it the keypress and keydown event

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.