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 3695772
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:39:30+00:00 2026-05-19T04:39:30+00:00

hey guys, i’m facing a little annoying bug that’s in my case not really

  • 0

hey guys,
i’m facing a little annoying bug that’s in my case not really userfriendly.

The user is able to set values of an inputfield with the Up and Down Arrow keys.
The focus is always set to the input field so the user is able to type after he has selected a value with the Arrow keys.

I want the Cursor Position to ALWAYS REMAIN at the last character of the input value so the user can type immediately after selecting a value via the arrow keys. That works just fine if you hit the down-arrow key because in that case the cursor automatically jumps to the end of the input-box.

Exactly the opposite happens if you press the up key – the cursor jumps to the beginning.
I was able to fix that with a “setCursorPosition” Script i found here on stackoverflow.

However, despite the fact that it’s working the user cannot really “feel and see” it. If I press the Up-Arrow key the cursor is still shown at the beginning of the input-value. As soon as I start typing the cursor jumps to the end and it works fine.

See it here: http://jsfiddle.net/3UHVY/1/

So I wonder if you have a solution so the cursor may always remain at the end of the input box when i hit the up or down arrow key and it’s also visible and logic for the user. Right now the user might think he has to grab the mouse and jump right back to the input box to set the cursor to the end.

  • 1 1 Answer
  • 2 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-19T04:39:31+00:00Added an answer on May 19, 2026 at 4:39 am

    You can suppress the browser’s default up-key behavior by returning false on key up:

    if(e.keyCode === 38)
        return false;
    

    http://jsfiddle.net/3UHVY/5/

    Alternatively, if that doesn’t satisfy your needs, you can hook on the keyUp event and move the cursor to the end of the input.

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

Sidebar

Related Questions

hey guys, I have mypage.com/user-login.php?action=register and I want to be able to call mypage.com/register
hey guys having this really simple problem but cant seem to figure out have
hey guys was hoping you could help me out, Not sure if I always
Hey guys I have an array of dictionaries plist file that I am reading
Hey guys I was wondering how I could download a file that is generated
Hey guys, I always get confused by this so it's not exactly my strong
Hey guys, I want to make a function loop over all elements that have
Hey guys, I'm currently trying to implement a function using C that takes in
Hey guys, I have a little issue here. I need my users to be
Hey guys! I have this little problem: I have one ViewController which adds 2

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.