ID:2961420
 
BYOND Version:516.1651
Operating System:Windows 11 Home
Web Browser:Chrome 131.0.0.0
Applies to:Dream Seeker
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:
Browser controls cannot immediately focus on input elements, after the browser control has been winsetted to have focus.

Numbered Steps to Reproduce Problem:
1. Open a browser window with HTML containing an input element, and JS to focus on this element after some delay.
2. Winset focus to the browser window that's been opened.
3. Be unable to type in the new browser window.

Code Snippet (if applicable) to Reproduce Problem:
var/html = {"
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">

<script>
function searchfocus() {
let searched = document.getElementById("search")
searched.focus()
}


window.onload = setTimeout(searchfocus, 1000)
</script>

</head>
<body>
<input type="search" placeholder="Search..." id="search">
</body>
"}


client/New()
. = ..()

src << browse(html, "window=test")
winset(src, "test", "focus=true")

The testcase is also here: BYONDiscord Link

Expected Results:
I can type in the input.

Actual Results:
I cannot.

Does the problem occur:
Every time? Or how often?
In other games?
In other user accounts?
On other computers?

When does the problem NOT occur?
On 515.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)

Workarounds:
Use Trident...

Login to reply.