fix(host): opening the path editor supersedes a pending listing
A navigation settling between the Edit-Path click and the first keystroke executed navigate's draft reset and closed the editor underneath the user; the click now bumps the request sequence like draft edits do (ds-review-bot).
This commit is contained in:
@@ -307,7 +307,14 @@ export function DirectoryBrowser({ open, listDirectory, createDirectory, onOpen,
|
||||
// listing itself fails, typing an absolute path is the one
|
||||
// remaining way forward.
|
||||
disabled={parentInert}
|
||||
onClick={() => { setPathDraft(selected?.path ?? parent?.path ?? '') }}
|
||||
onClick={() => {
|
||||
// Opening the editor supersedes any pending listing: a
|
||||
// settlement landing before the first keystroke would
|
||||
// otherwise close the editor via navigate's draft reset.
|
||||
requestSeq.current += 1
|
||||
setLoading(false)
|
||||
setPathDraft(selected?.path ?? parent?.path ?? '')
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user