-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
The app connects to the local linux server (copied server-components dir), but inputs fail to register. Seems to be a known issue.
Summary by claude
Description
Pointer lock requests fail with the error "Pointer lock requires the window to have focus" on macOS, even when the Tauri window appears to be focused and is the active window.
Environment
- Tauri version: 2.x
- Platform: macOS (Darwin)
- Rust version: rustc 1.92.0 (ded5c06cf 2025-12-08)
Steps to Reproduce
- Create a Tauri app with a webview that requests pointer lock on click
- Run the app on macOS
- Click on an element that calls
element.requestPointerLock()
Expected Behavior
Pointer lock should be granted when clicking on the element.
Actual Behavior
The pointer lock request fails with:
Pointer lock request failed: Pointer lock requires the window to have focus
Code Example
const requestPointerLock = () => {
const result = containerRef.current?.requestPointerLock()
if (result && typeof result.catch === 'function') {
result.catch((err) => console.warn('Pointer lock request failed:', err.message))
}
}
// Called on click handler - still fails
<div onClick={requestPointerLock}>Click to lock</div>What I've Tried
- Removed
transparent: truefrom window config - no effect - Called
getCurrentWindow().setFocus()before requesting pointer lock - no effect - Added
shadow: trueto window config - no effect
Current window configuration:
{
"windows": [{
"decorations": false,
"transparent": false,
"shadow": true,
"resizable": true
}]
}Additional Context
- The click event fires correctly (it's a valid user gesture)
- The window visually appears focused (title bar is active)
- This may be related to how WKWebView handles focus state vs the native window focus
- The issue may be specific to
decorations: falsewindows
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

