All Questions
676
questions
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="#&...
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 ...
0
votes
1
answer
44
views
Why is focusing an html element with the keyboard different than focusing with the mouse?
I'm trying to style an element based on whenever it's focused (either by holding a mouseclick on it, or while selecting it using the tab key), but I'm having different behaviors depending on which ...
-1
votes
1
answer
424
views
Keyboard not showing up on iOS when focusing input element
I'm testing a webpage on iOS. I am trying to allow tab-like behavior when the user presses the enter key, so I've written some code to focus the next element when that happens.
I also have an element ...
0
votes
0
answers
28
views
Trigger/Modify Browser ScrollIntoView Behavior on Focus
I have a scrollable table with a sticky header & footer, and input fields in each cell - think an Exel-like table. Now I encountered a problem when using tab to focus input fields in a row further ...
0
votes
1
answer
101
views
Force window to be active even when tab is not in focus
I'm programming an incremental game using Javascript and would like the game to remain active even when the tab is minimized or not curently in focus in the browser.
I've done some research but couldn'...
0
votes
1
answer
157
views
call navigator.mediaDevices.getUserMedia methods, camera cannot focus
I use navigator.mediaDevices.getUserMedia to set up the camera to scan the QR code. When the QR code is small, the camera cannot focus and capture clear images when it is too close. Setting the ...
1
vote
0
answers
34
views
Firefox focus styling not using correct tab order
In Firefox - when clicking to the left of my navbar and then pressing tab I end up focusing the 3rd element in my navbar not the first element like I would expect.
I have made a code pen to simplify ...
0
votes
0
answers
81
views
Why is the focus visible when a lightDom element in a web component is clicked?
I've created a simple web component that lets you create a custom button.
When clicked, I want the page title to be focused.
With button tag and a simple text content inside, the title is not visually ...
1
vote
2
answers
56
views
button on click event does not fire if active textarea has css to change size on focus
As you can test in snippet if i focus textarea and click on button no action fires, i have to click one more time
removing focus style all works fine.
what can i do?
thanks
textarea:focus{
...
0
votes
0
answers
39
views
Set focus on inputbox on page start HTML
I have an issue with html page. I want to set focus on the first input box when the page loads but all my attempts to do so ended in failure. I'm not sure what I've been doing incorrectly since I'm ...
0
votes
1
answer
25
views
Sound onHover works But Not Until User Clicks page
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="div4">
<img src="image.png" width="...
7
votes
1
answer
3k
views
Input fields adding focus-visible on click
I am attempting to selectively apply an outline on an input field only when the user has navigated to the element by keyboard. From my understanding the way to do this is removing the outline on focus ...
0
votes
1
answer
70
views
Pseudo :focus-within not working in Safari
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<...
3
votes
0
answers
464
views
Best practice for tab order in mobile vs. desktop
I'm currently developing a form that has two buttons at the bottom. One button for going back and another for sending the form. The problem i'm facing is when navigating with the tab key.
When tabbing ...