[Bug]: web blocks become unresponsive when switching focus between two of them
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 86/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- frontend
Direzione di ricerca
Inizia in frontend/app/block/block.tsx e ispeziona l’effetto del focus attorno a blockClicked e isFocused, riproducendo il problema con due blocchi web. Impedisci a un blocco che sta perdendo il focus di riappropriarsi del focus del DOM o del focus logico; il lavoro è completato quando passare da un blocco web all’altro lascia il blocco appena selezionato interattivo e stabile.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Current Behavior
With two web blocks open, clicking from one web block into the other makes both webviews unresponsive to input — buttons/links don't click, the URL bar can't be edited, typing does nothing. Only the block header icons (right side) still respond.
waveapp.log shows webview-focus flapping continuously between the two webview ids and null:
webview-focus null
webview-focus 23
webview-focus null
webview-focus 24
...
Focus is granted then revoked within a few ms (some events share the same millisecond), so no input ever lands. Terminal→web focus is fine; only web→web breaks.
Root cause is in frontend/app/block/block.tsx. blockClicked is state and lags one commit, so the focus effect also runs while a block is losing focus (stale blockClicked === true, isFocused === false). It can't tell "just clicked" from "just lost focus", so the de-focusing block re-grabs both DOM and logical focus. With two web blocks both doing this, they fight indefinitely. Single webview settles because there's no competitor.
Expected Behavior
Clicking from one web block to another moves focus once and stays there. Both web blocks remain interactive.
Steps To Reproduce
- Open two
webblocks side by side (e.g.wsh web open https://github.comandwsh web open https://example.com) - Click into web block A, then click into web block B
- Try to click a link/button or edit the URL bar in either — input is dead; header icons still work
Wave Version
v0.14.5
Platform
macOS
OS Version/Distribution
macOS 15 (Darwin 25.5.0), Apple Silicon
Architecture
arm64
Anything else?
Fix incoming — guard the re-focus in block.tsx so a block that is losing focus doesn't re-grab it.
- Lingua principale
- Go
- Stelle
- 22.3k
- Fork
- 1.1k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di wavetermdev/waveterm
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
wavetermdev/waveterm#3481 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
wavetermdev/waveterm#3435 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
wavetermdev/waveterm#3432 ·
-
enhancement triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
wavetermdev/waveterm#3431 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
wavetermdev/waveterm#3355 · 1 commento ·
Tutte le issue di wavetermdev/waveterm
Issue simili
-
bug github_actions
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
registrystack/registry-stack#1393 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
JakeChampion/lang#10213 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
oasisprotocol/oasis-sdk#2523 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100