Skip to main content

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.

textselection
Filter by
Sorted by
Tagged with
0 votes
1 answer
40 views

How can I change a TextInput's selection and fire its onSelectionChange event in unit testing?

I have a React Native component with a TextInput that I'm testing. Part of the behaviour of this component relies on handling the current selection position via onSelectionChange — that is, it matters ...
Autumn Leaf's user avatar
1 vote
1 answer
38 views

Text selection on flex reverse-column child happened in wrong direction

I'm trying to select text in flex reverse-column container but actual selection is wrong. Browser attempts to make selection from end of the element, that leads to wrong selection. Example, <...
Красный Паровоз's user avatar
0 votes
0 answers
24 views

C# - TextSelection is dimmed

I am maintaining a VSIX and I try to select the word at cursor with the DTE I have this function so far, and although it does select the word at cursor, the selection is dimmed. I mean it does not ...
pf12345678910's user avatar
0 votes
0 answers
26 views

Unexpected behavior when selecting text in C# WinForms WebBrowser

I created a WinForms application using .NET Framework 4.5.2. When I select certain text in the WebBrowser control and change the active window, the selection does not turn gray, but simply disappears. ...
Volodymyr Tarasovskyy's user avatar
0 votes
0 answers
18 views

Get caret position and selection range of any input type without using selectionStart and selectionEnd

According to the WHATWG forms spec selectionStart property applies only to inputs of types text, search, URL, tel, and password. This useful solution to get the caret position and the selection range ...
Ian Silva's user avatar
1 vote
0 answers
32 views

Is it valid in Harfbuzz to specify repeating cluster IDs in the unicode input?

I'm writing code which needs to find the advances for each grapheme in the original text (e.g., for cursor positioning and selection), and I would like to use the Unicode grapheme boundaries rather ...
trbabb's user avatar
  • 2,005
1 vote
2 answers
342 views

Detecting if a text is selected in Autohotkey

I need to check if any text selected in Autohotkey. I have this function which works fine: IsTextSelected() { SavedClip := ClipboardAll() A_Clipboard := "" Send("^c") ...
Afshin Davoudy's user avatar
2 votes
2 answers
571 views

Why does -webkit-user-select:text not work with button in safari?

This has been bothering me since August '23 when this was first reported, and I can't really find any authoritative answer. Example: https://jsfiddle.net/1t8Lng2j/ Problem: Text within a <button>...
GTK's user avatar
  • 21
0 votes
2 answers
340 views

Javascript : Extract Selected Text from PDF to Input Textbox in Javascript

I am working on one Project in which a Text from PDF which is Selected should be copied to Input Textbox where a Cursor is focused. There are 2 Windows. 1 : Where Input Textbox is there 2 : PDF is ...
user avatar
0 votes
1 answer
17 views

The jsTree plugin does not allow the user to select text using mouse

I'm using the jsTree latest plugin from https://www.jstree.com/. By default the text inside the jsTree are hyperlinks and due to that, the user cannot select the text using mouse drag. I want to know ...
Shwetha C N T's user avatar
1 vote
1 answer
132 views

How to disable text selection in a QDoubleSpinBox?

I want to make (or at least know If this is even possible) text that appears in QDoubleSpinBox to be unselectable. Right now, it looks like this: I have managed to make it so that the QDoubleSpinBox ...
Veljko's user avatar
  • 97
0 votes
0 answers
23 views

How to add style to only that word where cursor is placed with document.getSelection()?

I want to apply the style only to that word where cursor is placed. <p id="p">Hello</p> <script> let range = new Range(); range.setStart(p.firstChild, 2); range....
annonymous2345's user avatar
0 votes
0 answers
42 views

Why TextArea focus does not allow user to select and copy text?

In my angular application, I have a TextArea field and I am disabling and enabling it conditionally. Also I apply focus on it whenever it is enabled. But, Whenever the textArea field gets enabled and ...
vijay s's user avatar
  • 327
2 votes
1 answer
833 views

Enabling Text Selection in Compose LazyColumn by selection container

I previously used a WebView to display a long text and style each word based on some business logic. However, I recently transformed this HTML content into a list of sentences and utilized a ...
imansdn's user avatar
  • 1,157
0 votes
0 answers
38 views

Javascript - selection not highlighting when editing element in dom

When I select some text via the window.getSelection().addRange() function just after I edit the element, the selection is not shown on the browser (Chrome). I need it for a search/replace ...
Michael Lamprecht's user avatar
3 votes
0 answers
159 views

How can I give focus to a TextField without any text being selected in flutter?

When I perform requestFocus() on a TextField that has any text, the text will become selected. What I want is to have the cursor at the end, without selecting any text. How can I give focus to a ...
F F's user avatar
  • 31
0 votes
0 answers
30 views

Firefox does not emit mouse events during text selection?

I have a data grid component that supports arbitrary cell range selection similar to excel/google sheets. I determine the start cell by a mousedown and the end node by recording the last cell that ...
インキャ's user avatar
2 votes
1 answer
69 views

Multiple lines of text with alternating row colors (a Log view). How to select text across all lines?

I have a log view. I want to display the log lines in alternating background colors. I want to allow text selection across the whole log view. This can be done with .textSelection(.enabled) on a ...
soundflix's user avatar
  • 2,380
0 votes
1 answer
115 views

Text Selection Pop Menu

if user Select a text there should be quicknote menu will popup so I Need to show a popup menu when user select text in my flutter project . I Need to show a popup menu when user select text in my ...
Shailaja Tripathi's user avatar
0 votes
0 answers
31 views

How to toggle tag element for selection text without execCommand?

So, I'm working on a text editor for my platform and I was working with execCommand but it's not working as expected and it's limited. So I'm working now with selection surroundedContent etc The ...
Fitri Ahmed's user avatar
0 votes
2 answers
171 views

Google Sheet Query - combine text into single cell by category

i came across this formula, but i dunno how to change it. to display the Query value in single cell by category. there are 5 categories, 1st cell show 1 category, 2nd cell show 2nd category and so on.....
loveli's user avatar
  • 1
0 votes
1 answer
78 views

Text selection handles always visible

I’m developing an application that includes a Webview. After a user selects text in the Webview a panel slides up and expands on top of the Webview and can hide the selected text. In this situation ...
David Hershkovich's user avatar
4 votes
1 answer
787 views

Set selected text in SelectionArea

I understand how to read the selected text in a SelectionArea, but I would also like to make selections as well. Given access to a SelectionArea, how do I programmatically set what it is selecting? ...
Microbob's user avatar
  • 794
0 votes
1 answer
118 views

VBA word non-contiguous selection of all text instances

The code is meant to search through the current open Word document and select all instances of currently selected text. For example, I select "Casted" run the macro, and anywhere the text &...
Gen's user avatar
  • 15
1 vote
0 answers
49 views

Selection API containsNode seems inconsistent with visible selection

The Selection: containsNode() method takes an optional second argument i.e. partialContainment. When I set this to true, it seems to work ok, but sometimes picks up neighboring elements that are not ...
Mr. Polywhirl's user avatar
0 votes
0 answers
32 views

Text selection error on mobile with "select all"

The "select all" function in my HTML site on mobile devices (and CTRL+A on windows) is selecting all the text of the entire site instead of just the current paragraph. This behavior is ...
THE MANUX's user avatar
  • 123
1 vote
2 answers
309 views

only allow select text inside the element, and only if the selection starts inside it

similar question: CSS allow text selection within an element only but that's not what I want I get two sibling elements, if the user starts a text selection inside A, then I don't want any other text ...
Littlee's user avatar
  • 4,159
0 votes
1 answer
11 views

Selection changes when wrapping a string that spans across multiple tags

The range.surroundContents function is pretty straightforward but it doesn't work if your selection goes through multiple tags. For example, I have this string (the part in the square brackets is my ...
Whip's user avatar
  • 2,106
4 votes
0 answers
527 views

How to select all text inside a SelectionContainer in Jetpack Compose?

Consider a LazyColumn inside a SelectionContainer that contains some composables like this: SelectionContainer { LazyColumn { repeat(50) { n -> item { Row { Text(&...
Lucas Sousa's user avatar
1 vote
3 answers
349 views

How to delete text selection with range in Visual Studio Code?

I have a csv that looks wrong on certain lines so I want to delete lines manually in line range 1 to 281387 using Visual Studio Code as Text Editor. I've tried using the cursor and Ctrl + Shift + ↑ ...
Jordy's user avatar
  • 1,837
1 vote
0 answers
1k views

how to change double click behavior in vscode editor to increase selected text scope

vscode editor double-clicking on words goes from single word selection to all line instead of gradually expanding the selection scope from word to text including quotations to full line. The bracket ...
user15420598's user avatar
0 votes
1 answer
1k views

SelectionArea not working properly on web app seen on mobile browser

I'm encountering an issue with SelectionArea on flutter/dart. I'm building a website for my professional activity and everything works fine except this. I have a Text widget that I wraped into a ...
Crapul's user avatar
  • 15
7 votes
2 answers
1k views

Why is text selection not visible in GitHub or other websites using the Google Chrome browser?

Firefox and Edge do not have this problem. When using Google Chrome browser, I am trying to select code or text. The text is selected, but it is not visible. The usual highlighting of the background ...
Leo Kac's user avatar
  • 448
0 votes
1 answer
65 views

Selected text remove element already wrapped in a span

I have a scenario/dilemma, I am a little stuck trying to figure out. Below will be my best of a visual representation. 1. I select This is dummy text to select 2. I bold and it gets wrapped with a ...
Depicted's user avatar
3 votes
1 answer
748 views

How do I programmatically clear the selection of a SelectableText.rich in Flutter?

I am working with the SelectableText.rich widget in Flutter, and I am trying to figure out how to programmatically clear the user's selection (i.e. when they tap another part of the screen). I have a ...
holycamolie's user avatar
1 vote
1 answer
360 views

Selection object could not be cloned

I've tried 4 ways to clone the Selection object but it does not work. The first 3 methods return a empty Object. document.onselectionchange = function() { let selection = document.getSelection(); ...
Marian07's user avatar
  • 2,472
1 vote
1 answer
124 views

Exclude element from copied text in Safari

I want users to be able to copy-paste a block of text without also getting inline controls, like buttons. In Chrome, applying user-select: none; to the controls accomplishes this. If the user selects ...
twhb's user avatar
  • 4,514
0 votes
1 answer
266 views

how to customise the toolbar for a flutter SelectableRegion

When text in a SelectableRegion widget is selected, the toolbar generated by materialTextSelectionControls has options for 'Copy' and 'SelectAll'. What is the best way to disable 'SelectAll' and how ...
Frank H's user avatar
  • 15
2 votes
0 answers
441 views

How can I do custom text selection in react native?

I just want to do a simple task here. Select some text and then do some manipulation on the selected text. I have searched for over a day on custom selection in react native but couldn't find any ...
Haris Ejaz's user avatar
0 votes
1 answer
12 views

position floating div under selection within viewport window

How do you position a floating div (i.e. position:absolute, e.g. dialog box) under text that has been selected while still showing the whole div within the viewport window even if the selection is at ...
W. Nema's user avatar
  • 329
0 votes
0 answers
55 views

How do I NOT copy to the clipboard in JavaScript?

I have suddenly in recent months repeatedly suffered FF (last few??? versions) web pages overwriting my X primary selection ON THEIR OWN. This is an enormous vulnerability, as I usually paste with ...
Daniel's user avatar
  • 541
1 vote
1 answer
53 views

Text Selector Cursor is Not disapeared After Switching the Fragments

I am building a android app in which there is a screen in which there are two tabs in form of fragment fragments are basically used for language translation. The problem is when i input something ...
Shivam Sharma's user avatar
0 votes
1 answer
393 views

Deselect (any) text programmatically Android Compose

I am using Android Compose ExposedDropdownMenu, but its text can be selected with a long press. Using DisableSelection section does NOT help at all: DisableSelection { ExposedDropDownmenu(){......
T D Nguyen's user avatar
  • 7,423
2 votes
2 answers
884 views

Get selected / highlighted text in Google docs from a chrome extension in Mac and Windows OS

The goal is to get the highlighted text when a user selects text in Google docs like this: Since window.getSelection() doesn't work in Google doc, they expose docs-texteventtarget-iframe element to ...
Abreham's user avatar
  • 445
0 votes
1 answer
605 views

Is it possible to fully disable text selection for input?(Bugged user-select in input element (Chrome) ?)

I've been trying to find a way to fully prevent text input text selection (Chrome, v. 104) #testInput { user-select: none; pointer-events: none; width: 100%; } <!DOCTYPE HTML> <...
Newstory's user avatar
1 vote
0 answers
376 views

Multi caret insert/edit of selection in VS Code

I want to refactor some code which consists of repeating values using vs code. I am aware of { "key": "ctrl+d", "command": "editor.action....
Dalton's user avatar
  • 427
0 votes
0 answers
446 views

How to get text selection properties in Google Docs or Canvas

Is there a way to get the text selection properties from Google Docs? I am looking for something similar to window.getSelection() that works in Google docs or Canvas element. I am developing a Chrome ...
Abreham's user avatar
  • 445
1 vote
0 answers
832 views

Font Family and Font Size Combo Box Coding Bugs

it's been a while since I posted. Haven't had much time for programming for a while. Just got back into it a couple of days ago. I'm working on a personal project which is a kind of Project Manager ...
John Michael Wilkinson's user avatar
0 votes
0 answers
39 views

Text Seletion with markers for web browser

How to achevie the Text selection along with markers for web browsers (angular / Javascript code). Some thing like UITextView text selection and highlight jumping in iOS 8, but need to acheive in web ...
RONE's user avatar
  • 5,455
0 votes
1 answer
120 views

Adobe Illustrator text selection different from other document

I am doing a copy-paste job from Word to Illustrator, whenever I double click on the word in the docx the whole word is selected like this but when I try to double click in illustrator it leaves the ...
Rajat Audichya's user avatar

1
2 3 4 5
10