mirror of
https://github.com/zadam/trilium.git
synced 2025-12-21 07:39:55 +01:00
chore(quick_edit): bring back focus
This commit is contained in:
@@ -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 />
|
||||
|
||||
Reference in New Issue
Block a user