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

  • Home
  • SEARCH
  • 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 6200173
In Process

The Archive Base Latest Questions

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

I need to create following functionality in javascript: User should be able to get

  • 0

I need to create following functionality in javascript:

  1. User should be able to get into text selection mode (by long pressing a word or clicking a dedicated button, how user goes into text selection mode is not important)
  2. Once in text selection mode, two handles should appear on the start and end of selection which will allow user to extend the selection (users will be able to drag the handle images to extend the selection)
  3. Selected text would appear in highlighted mode

Following is an example of the same functionality in Android 3.0 browser:
enter image description here

I need to create the same functionality using Javascript. I tried to searhc “javascript text select” but could not finad anything useful. Can someone suggest me how to do this or point me to any existing work? Thanks much.

  • 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-24T04:19:13+00:00Added an answer on May 24, 2026 at 4:19 am

    What you are stating is a very broad user interface problem and you cannot solve it with few lines of Javascript code. I am pretty well aware of existing mobile Javascript libraries and I have not yet come across a productized solution, because the problem in fact is really difficult.

    • You need to have zoom/follow finger feature which applies complex heurestics to where the cursor actually should go

    • Moving markers alongside in arbitary HTML text is troublesome – you need to have a way to split HTML to smaller pieces

    Thus, I suggest you either

    • Write a cross-platform faux text selection library (this is not a programming question, but a daily job for a person who knows HTML5 and mobile very, very, well)

    • Post this a freelancher bounty job <– a suggestion

    From a technical point you

    • can disable native text selection of devices (-webkit- special CSS styles)

    • probably cannot interact with native clipboard through Javascript on mobile

    • older Android devices lack proper Javascript events for the complex touch interaction in the first place

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

Sidebar

Related Questions

I need to create the following functionality, and looking for the best way to
I need to create an installer program that will do install the following: ASP.Net
Imagine having the following scenario: You need to create a system where the Back
Hi I have the following interfaces that I need to create. Can you just
Oh great Stackoverflow, I beseech thee... I need to do the following: CREATE UNIQUE
I need create custom dialog and put JPanel into it. Is it possible?
I'm working on a poker analysis tool with the following use case: User create
We have the need for the following kinds of services: Publicly available. User is
In JavaScript there is the possibility to create getters and setters the following way:
i need create an email list sending to many emails. what is best solution

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.