Skip to main content

Questions tagged [focus]

Focus indicates the component of the graphical user interface which is currently selected to receive input.

0 votes
0 answers
12 views

How to manually set focus on element in a shadow DOM (Lit Web Component)

I'm building a select/dropdown component as a Lit web component. To have consistent styling, this is NOT using a native select. I'm using divs and adding logic to have them appear when and where ...
ineedtoknow's user avatar
  • 1,559
0 votes
0 answers
10 views

React 18 content editable field focus issue

I am working on a quiz application where answers to a question are managed with content editable. I use React 18 for front-end development. I use Dummy options(id= 0) to add options faster and allow ...
Sreelakshmi M's user avatar
0 votes
1 answer
27 views

using :focus without a button or link?

Is it possible to use :focus without having a button or link to focus something? I'm trying to put the code into a game which "doesn't allow" buttons and when I try using <a href="#&...
hallodu's user avatar
0 votes
2 answers
45 views

Lost focus on one input effects all inputs

I have created an application form with a validation function that requires the user to input the correct information within the boxes before clicking away from that focused box or an error message ...
ryanl's user avatar
  • 31
0 votes
1 answer
34 views

using :focus to show something with a button

I have a question regarding :focus. I want to have a button/text that shows <div class="contentbox2"> when clicked, but i'm really struggling with that. I tried several ways but i can ...
hallodu's user avatar
0 votes
0 answers
19 views

Compose focus requester never works

Despite all the examples here, even the hacky solutions using a delay, nothing seems to work. The focus needs to happen on recomposition when an error flag is true validating a username or a password. ...
DevinM's user avatar
  • 1,243
1 vote
1 answer
38 views

Prevent focus on specific elements jQuery

OK, I have a weird need. I'm not trying to trap focus inside of a specific div, I'm trying to prevent it from entering specific other ones. I have a script which changes the class on a div from "...
DeanH's user avatar
  • 497
-1 votes
1 answer
35 views

Website no longer recognizes popup window name. Javascript

Tell me if this makes any sense. I have been accessing a website through a popup window for years. using window.open('https://example.com',mypopup,parameters); I click a button in my main window, and ...
CheeseFlavored's user avatar
0 votes
0 answers
27 views

Pressing "enter" focuses on the dialog instead of the other fields

On my main page, I render a table that shows some orders. When the user clicks on any of the orders, a Dialog opens up with an additional table showing the products related to the order. The first two ...
Alessandro Cecchini's user avatar
0 votes
1 answer
22 views

SwiftUI Checkbox focus ring too large and off-center--is this bug?

This code demonstrates the problem: the checkbox's focus ring is too large and off-center on macOS 14.5. (I haven't checked other macOS versions. Also note, this is not an iOS question.) import ...
pfurbacher's user avatar
  • 1,823
2 votes
1 answer
244 views

How to prevent my window from gaining input focus?

I am implementing an AutoComplete, but one that will match text anywhere in the list of enumerated strings—rather than just the beginning of a suggestion as is the behavior of the built-in ...
Ian Boyd's user avatar
  • 253k
1 vote
0 answers
58 views

How to fix cursor behaviour in custom TextField in Flutter?

I have created a custom TextField, where there need to be the following things: The possibility to pass a custom controller, so that when the user scans a barcode, I can update the text with the ...
Pandruz's user avatar
  • 427
0 votes
0 answers
15 views

Selectize force blur when using keyboard navigation

I'm trying to add and remove a focus class to selectize but i can't seem to get it to work at all when navigating using a keyboard only. It works fine when using a mouse. var focusEvent = function () {...
blu's user avatar
  • 393
0 votes
2 answers
105 views

.Net Maui Android cannot hide keyboard

UPDATED - Trimmed down user control: using CommunityToolkit.Maui.Core.Platform; using CommunityToolkit.Mvvm.Input; using System.Diagnostics; namespace GSL.Presentation.CustomControls; public partial ...
George M Ceaser Jr's user avatar
0 votes
1 answer
50 views

Find out which field in SAP has focus / is the active field with VBA (Excel)

I write scripts in VBA to change data via SAP GUI. I can easily set focus to a defined field in SAP GUI (e.g. Session.FindById("wnd[0]/usr/ctxt[2]").SetFocus). But how can I find out what ...
Fluppi's user avatar
  • 3
-2 votes
0 answers
55 views

SwiftUI: Changing ListView Row Background Color Based on Focus During Scrolling

I'm trying to change the background color of rows in a ListView while scrolling in SwiftUI. I've attempted the following code, but it's not working as expected List { ForEach(viewModel.menuItems) {...
Prasanna Kumar Komminani's user avatar
0 votes
0 answers
16 views

Compose Focus Order Not making any sense

I have a pretty basic layout. val focusRequesters = List(3) { FocusRequester() } Column( modifier = Modifier. focusProperties { next = focusRequesters[0] } ) { Box ...
Cayce K's user avatar
  • 2,318
2 votes
1 answer
44 views

How do I set focus on a div in React in order to trigger an effect with onBlur?

I'm working on a pretty basic note taking app with React. Purely a front end question. On a sidebar I have a list of all the current notes, which the user can use to swap between them. Each note ...
OptimusGrime's user avatar
0 votes
0 answers
23 views

scrollIntoView not working when the component is out of focus, on chromium based browsers

I'm building a react single page app and have noticed that the scrollIntoView function does not work on chrome based browsers (tested on edge&chrome) when the component is out of focus. I have a ...
SassyPantsy's user avatar
0 votes
0 answers
48 views

How to control focus events in tkinter with root.overrideredirect(True)?

Details: Python 3.12.3 The tkinter <FocusOut> event should be triggered when the window looses focus. This works just fine in normal windows, but when I do root.overrideredirect(True), the ...
Ayman Al-mankkadhi's user avatar
0 votes
0 answers
6 views

input type date focus color change

How to change the input type date focus default color blue to some other color. The default focus color is coming blue. how to change the mm selected default blue color. The default blue color coming ...
Mathi's user avatar
  • 21
0 votes
0 answers
36 views

SwiftUI AccessibilityFocusState not working in Lists

I have a view shown as a crouton (from bottom view) when tapping a button. I want to move accessibility focus to this view when shown but using AccessibilityFocusState only works if the button is NOT ...
rai212's user avatar
  • 751
0 votes
0 answers
30 views

NVDA overrides eventListeners on arrow keys 38 and 40 with its own behavior for that

The "handleAccordionKeyDown" function enables arrow key navigation in an accordion. If the first accordion element, a link, is focused with the tab key, arrow key navigation is activated. ...
gbecker's user avatar
  • 11
0 votes
0 answers
78 views

How to properly pass destinations to a TVFocusGuideView in React Native

I'm having trouble with focus redirection using TVFocusGuideView in React Native for a TV App I'm developing. Basically I have a sidebar in my application, and when the user views content, they are ...
lmseper's user avatar
1 vote
2 answers
33 views

How can I set the focus to an invisible button or the window itself in a QDialog (PyQt5)?

I want to have a QDialog that blocks the interaction with the MainWindow, but where initially no widget has a focus, i. e. no button has a blue border and gets pushed when hitting "Enter". I ...
jon_tea's user avatar
  • 13
0 votes
1 answer
44 views

Handling focus changes in tvOS SpriteKit app, where scene is embedded in a SwiftUI SpriteView

I'm having a mare trying to receive TV remote navigation (via the focus engine) in my SpriteKit game. I've got a SwiftUI tvOS app with the following heirarchy: struct SwatchGridSceneView: View { ...
Jacob King's user avatar
  • 6,089
0 votes
1 answer
20 views

Flutter TextField onTopOutside: can not refocus after unfocus

Scaffold( appBar: AppBar(title: const Text('Example')), body: SizedBox( width: 100, height: 40, child: Builder(builder: (context) { ...
eastwater's user avatar
  • 5,276
1 vote
0 answers
13 views

selectorprimaryfocus in ComboBox

I am trying to set focus to a comboBox which is present inside a Tearsheet when the tearsheet is opened. but it doesnt work. import { ComboBox } from "@carbon/react"; import { Tearsheet } ...
Raghavi's user avatar
  • 11
1 vote
3 answers
58 views

Not possible to set focus on content of Tooltip component from Material UI on firing onClick event but possible on firing onKeyPress event

I am using Tooltip component from MUI in my customized TooltipComponent. TooltipComponent works similar to Dialog: user can see some content pop up after clicking (not hovering) on element (div with a ...
yakob's user avatar
  • 61
1 vote
1 answer
46 views

Focus isn't regained when swiping back from a Route, unlike using the back button in Flutter, iOS

Any ideas on why this is happening and possible solutions would be really welcome! When I have assigned Focus to a Widget and I am navigating to a new route, and then navigating back to the previous ...
Dimitrios Chatzichristofas's user avatar
1 vote
1 answer
56 views

WPF TextBox select content on mouse click

For WPF TextBox I need to select all content of it in case of mouse click on it (in "real life" it will be touch on touchpad monitor). For test I created simple project and check the ...
Fedor Yudin's user avatar
1 vote
2 answers
328 views

VS code isn't focused when I click on it on my Ubuntu machine

Whenever I click on vs code with my mouse, It focuses on the window behind or other apps. I am using Ubuntu 24.04. I don't know if this has any relation with it since it worked fine on older versions. ...
Mohamed Gom3a's user avatar
2 votes
0 answers
44 views

Why can't I type in on custom autocomplete popper with input

I can't write in the input label and year. In my application, I have a dropdown where I have an input for search and two inputs for add a film (title and year). The main problem is that the focus is ...
Dragos-Iustin Vlad's user avatar
0 votes
1 answer
45 views

React js make background blur when input is focused

I want to create an input field like in the picture, if the input field becomes focused then I want to change the background to blur image example Do I have to use a certain library? I'm currently ...
Terhebat Hokage's user avatar
0 votes
0 answers
49 views

Jetpack Compose: how to set initial a11y focus

I cannot figure out how to set the initial focus for Talkback for Compose elements... I am able to do it for keyboard focus just fine... Here is an example where you click on the first thing with a ...
Kristopher wolff's user avatar
0 votes
0 answers
90 views

What happened to the Windows feature that prevented applications to steal the focus?

Some years ago, it was useless to use an API such as SetForegroundWindow to force some Window to the top of the Z-Order: the only result you got was a blinking icon in your taskbar, as stealing focus ...
manuell's user avatar
  • 7,590
0 votes
3 answers
72 views

Flutter TextField: how to lose focus on tap outside?

Flutter TextField: how to lose focus on tap outside? TextField() It loses focus only when tap another widget that can take focus such as TextField. What if the TextField is the only one widget in the ...
eastwater's user avatar
  • 5,276
1 vote
1 answer
111 views

Material UI custom colors

Goodmorning everybody, I am trying to develop a website using ReactJS and Material UI. I started from this template. I would like to modify the color of the TextField when focused: now it is blue, let'...
Deffo's user avatar
  • 175
0 votes
0 answers
40 views

Pi Virtual Keyboard doesn't focus in text box

On a PI 4 I have installed "Matchbox Keyboard" and "Onboard" but can get neither one to focus where I want to write text. I am trying to write something in a browser search bar so ...
Johnh's user avatar
  • 1
0 votes
0 answers
37 views

Jetpack Compose: how to set focus color separate from ripple color

We use a dark ripple color for most of our controls, which gives us a dark grey ripple effect AND dark grey focused state. But we also use a custom "border-style" focused state for controls. ...
Kristopher wolff's user avatar
1 vote
0 answers
28 views

In VSCode is there a way to focus on first editor in first group in one command without altering "last recently used editor"?

I want to focus on first editor in first group using a keybinding, then using another keybinding I want to switch the focus back onto the editor I was working on before. This previous editor might be ...
ghis's user avatar
  • 431
0 votes
2 answers
22 views

How to programmatically set focus to TextField built by fieldViewBuilder of an Autocomplete widget?

Tried to give input focus to a TextField by extracting the FocusNode from the AutoComplete's fieldViewBuilder function. For this i need a setState call inside the fieldViewBuilder function, which ...
Lothar Langer's user avatar
1 vote
1 answer
170 views

How to shift focus and undo focus from one widget to other in flutter?

I've been new to flutter, and I am learning right now how this focus works? So far from ai chats and stackoverflow [links][1] (one of the best links I found) I have come to know about `focusnode` but ...
bonny's user avatar
  • 709
1 vote
0 answers
111 views

Android Compose (TV) wrong focus when TTS is on

Using jetpack compose to create an APP for TV platforms and I've been trying to create a Vertical List of Horizontal Lists using a LazyColum/LazyRow having a enter Focus (first item Top Left), when ...
daduck's user avatar
  • 286
1 vote
1 answer
47 views

Image viewer with thumbnail Arrow Keys and Click - not able to focus again on click

I have a fairly simple image viewer that puts small images (thumbnails) into a div and allows the user to left and right arrow through the thumbnails and see the larger image below. It also focuses ...
Paulwracc16's user avatar
0 votes
0 answers
42 views

useEffect Not Properly Handling Focus on iOS Devices in React Application

I'm working on a React application where we use a custom hook (useFlipAnimation) to manage the flipping animation of a card component. When the card flips to its back side, we want to automatically ...
cypk's user avatar
  • 11
0 votes
1 answer
54 views

tabindex for divs with landmark roles, right or wrong?

I have had feedback from an accessibility expert that it is irritating for screenreader users that I use tab indexes on my landmark regions. I added the tab-index so that users can use skiplinks to ...
Sarah's user avatar
  • 88
1 vote
1 answer
75 views

What am I doing wrong when trying to manually focus an input with Angular and PrimeNg?

I am using Angular with PrimeNg. I have a Google Forms-like app and in a part of the app I have a set of options, each having a radioButton. I can have the 'Other' option where the user can manually ...
codrut's user avatar
  • 67
1 vote
0 answers
44 views

JavaScript Focus Ring Option Is Not Working

I'm using the code below to set focus to a button and have a focus ring displayed around the button. While the button does indeed get focus (which I can tell because if I press the space bar the ...
snixdad's user avatar
  • 37
0 votes
0 answers
9 views

Prevent checking checkbox input in contentEditable from stealing focus from editor in Android webview?

Unfortunately event.preventDefault inside of mousedown doesn't do the trick. I tried the same inside of pointerdown (no luck) and touchstart (it says the event is not cancellable) I can't insert any ...
Slbox's user avatar
  • 12k

15 30 50 per page
1
2 3 4 5
147