fix(tui): preserve modal focus across dialog replacement (#36656)
Co-authored-by: Simon Klee <52795+simonklee@users.noreply.github.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
This commit is contained in:
parent
828a4b3f15
commit
339fd50cb9
1 changed files with 1 additions and 0 deletions
|
|
@ -90,6 +90,7 @@ function init() {
|
||||||
let focus: Renderable | null
|
let focus: Renderable | null
|
||||||
function refocus() {
|
function refocus() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
if (store.stack.length > 0) return
|
||||||
if (!focus) return
|
if (!focus) return
|
||||||
if (focus.isDestroyed) return
|
if (focus.isDestroyed) return
|
||||||
function find(item: Renderable) {
|
function find(item: Renderable) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue