Questions tagged [textselection]

In User Interface Design, text selection is the method of handpicking a portion of text, most commonly for the purpose of copying/cutting/pasting.

In User Interface Design, text selection is the method of handpicking a portion of text that will be further acted upon by the user. The selection is done by the interaction devices provided by the user interface.

Text selection is most commonly associated with the user actions of copying, cutting, and pasting. In Graphical User Interface, text selection is performed by a mouse or touch represented as cursors.

459 questions
12
votes
2 answers

How can I stop text from being selected?

In my web app the user can sometimes click the same button a number of times, skipping through messages and things, causing the to be selected. So how can I prevent this using Javascript (jQuery)
Ben Shelock
  • 20,154
  • 26
  • 92
  • 125
12
votes
1 answer

Set cursor to specific position on specific line in a textarea

I am trying to somewhat duplicate the "autocorrect" functionality seen in programs like Microsoft Office's Outlook. For starters, anytime a user types "a " (the letter a and a space) at the beginning of a line I want to change that text to "*Agent…
Wesley Smith
  • 19,401
  • 22
  • 85
  • 133
12
votes
2 answers

Android- How can I show text selection on textview?

I am implementing a epub reading app where I am using textview for showing text of epub. I want to select text from textview when user long presses on textview and then do multiple operations on selected text of textview like highlight etc.. So,…
Rohit
  • 2,538
  • 6
  • 28
  • 41
11
votes
1 answer

How do I keep standard 'select all' and 'copy' menu items in the WebView text selection menu?

I need to extend android WebView's text selection menu with my custom commands. So far I have managed to implement my custom webview text selection menu the following way: public class CustomActionWebView extends WebView { static String TAG =…
Ivan
  • 6,388
  • 3
  • 24
  • 30
11
votes
1 answer

Disable Chrome for Android text selection popup

I want to hide the Chrome for Android text selection popup that is shown if the user selects any text, such that the default text option popup (attached screenshot) does not appear. Is there anyway to do so using javascript, without removing the…
Shivam Tyagi
  • 158
  • 1
  • 12
11
votes
4 answers

How to clear the selection in an EditText?

How do you programmatically remove the selection from an EditText? I've tried: myEditText.setSelection(selectionEnd); but that just creates a selection of 0 length at the end of the current selection. I've also tried…
yuttadhammo
  • 5,069
  • 6
  • 34
  • 45
10
votes
2 answers

Android 3.x ONLY WebView Text Selection + JavaScript

Problem domain: Android WebView based ePub format reader -- We need text highlights which are accessible via JavaScript methods (ie turn em on, turn em off, save them email them, etc) Anyone in the know, please correct me if I'm wrong: During text…
Dan
  • 1,002
  • 12
  • 24
10
votes
0 answers

Open Custom dialog on text selection of webview

I have implement code of text selection in webview. It's working very fine without any issue. But I want to open custom dialog instead of default dialog. The which I have use its link is below How to override default text selection of android…
Anand Savjani
  • 2,484
  • 3
  • 26
  • 39
10
votes
2 answers

SublimeText 2: Select lines that match search terms

I need to select some lines inside of a list of file names to bring them at the end of the list. Suppose I have Files.txt with this…
Cheshire Cat
  • 1,941
  • 6
  • 36
  • 69
10
votes
1 answer

Highlighting/ Selecting text on element with Javascript/JQuery for mobile web (android, iOS, Windows Phone)

I'm attempting to speed up the process for "copying and pasting" text in ALL mobile web browsers (Android, iOS, and Windows Phone) by allowing a user to click/touch an element and it will auto "select/highlight" the text inside that element. ✔ What…
Oneezy
  • 4,881
  • 7
  • 44
  • 73
9
votes
1 answer

TextSelectionThemeData is not changing selectionHandleColor in flutter

Tested on Both physical device and simulator. As we all know textSelectionHandleColor is deprecated. So, I decided to make some changes in my app code, unfortunately, selectionHandleColor is still default blue color we get, when we create new…
Creator
  • 303
  • 4
  • 23
9
votes
1 answer

JavaScript: Tracking Selection Change on Firefox for Android

I'm looking for a way to track the text selection on a web page. I need some code to be executed whenever there is a change in selection. I have successfully done this on all major desktop browsers, but the same does not seem to be working on…
techfoobar
  • 65,616
  • 14
  • 114
  • 135
9
votes
2 answers

Jquery - If cursor position at the start/end in a textfield

i have a textarea and I want to check if the cursor is at the start or at the end (I dont need the current position). Did anybody know a simple jQuery solution? Thanks in advance! Peter
Peter
  • 11,413
  • 31
  • 100
  • 152
9
votes
1 answer

How to get currently selected text from within electron desktop application?

I am building a desktop application with electron. As a part of its functionality I want to get text that is currently selected, when a particular event fires. This text can be any where - webpage, pdf, sublime etc. Is there any way I can do this?
indraneel
  • 405
  • 4
  • 10
9
votes
5 answers

Disable mobile Chrome 43's "Touch to Search" feature programmatically

When I select text in Chrome 43 on my Android device I get the "Touch to Search" popup. We're currently using text selection for a feature on our site and this new Chrome feature interferes with some of our UI. In the long run, we'll be working out…
Benjamin Solum
  • 2,281
  • 18
  • 29
1 2
3
30 31