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

15 30 50 per page
1
2 3 4 5
245