Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug]: web blocks become unresponsive when switching focus between two of them

Aperta Adatta ai principianti
#3,428 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
  1. Open two web blocks side by side (e.g. wsh web open https://github.com and wsh web open https://example.com)
  2. Click into web block A, then click into web block B
  3. 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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di wavetermdev/waveterm

Tutte le issue di wavetermdev/waveterm

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.