chore(quick_edit): bring back focus

This commit is contained in:
Elian Doran
2025-11-22 19:34:14 +02:00
parent bb9cb2fb75
commit 2f440eba37
3 changed files with 4 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ const noteContext = new NoteContext("_popup-editor");
export default function PopupEditor() {
const [ shown, setShown ] = useState(false);
const parentComponent = useContext(ParentComponent);
useTriliumEvent("openInPopup", async ({ noteIdOrPath }) => {
await noteContext.setNote(noteIdOrPath, {
@@ -30,6 +31,9 @@ export default function PopupEditor() {
className="popup-editor-dialog"
size="lg"
show={shown}
onShown={() => {
parentComponent?.handleEvent("focusOnDetail", { ntxId: noteContext.ntxId });
}}
onHidden={() => setShown(false)}
>
<NoteDetail />