JSON editor notes section #481

Closed
opened 2026-02-04 19:11:17 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @bvdberg01 on GitHub (Feb 11, 2025).

Originally assigned to: @BramSuurdje on GitHub.

Please verify that you have read and understood the guidelines.

yes

What type of issue is this?

Bug

A clear and concise description of the issue.

When editing a note in the JSON editor, you can only add one letter at a time or only append text at the end.

Which browser are you using?

Chrome

If relevant, including screenshots or a code block can be helpful in clarifying the issue.

https://github.com/user-attachments/assets/84b6fecf-30db-4df1-b62c-9268e79744ff

Please provide detailed steps to reproduce the issue.

Go to https://community-scripts.github.io/ProxmoxVE/json-editor add text and after that try to edit the text somewhere in the middle.

Originally created by @bvdberg01 on GitHub (Feb 11, 2025). Originally assigned to: @BramSuurdje on GitHub. ### Please verify that you have read and understood the guidelines. yes ### What type of issue is this? Bug ### A clear and concise description of the issue. When editing a note in the JSON editor, you can only add one letter at a time or only append text at the end. ### Which browser are you using? Chrome ### If relevant, including screenshots or a code block can be helpful in clarifying the issue. https://github.com/user-attachments/assets/84b6fecf-30db-4df1-b62c-9268e79744ff ### Please provide detailed steps to reproduce the issue. Go to https://community-scripts.github.io/ProxmoxVE/json-editor add text and after that try to edit the text somewhere in the middle.
OVERLORD added the bugwebsite labels 2026-02-04 19:11:17 +03:00
Author
Owner

@MickLesk commented on GitHub (Feb 13, 2025):

@BramSuurdje idk, i think this part:

    // Restore focus after state update
    if (key === "text") {
      setTimeout(() => {
        inputRefs.current[index]?.focus();
      }, 0);
    }
  }, [script, setScript, setIsValid, setZodErrors]);

causes the issue, but when removed we need to enter every single key 😄 you are the webdev, take a look 😅

@MickLesk commented on GitHub (Feb 13, 2025): @BramSuurdje idk, i think this part: ```typescript // Restore focus after state update if (key === "text") { setTimeout(() => { inputRefs.current[index]?.focus(); }, 0); } }, [script, setScript, setIsValid, setZodErrors]); ``` causes the issue, but when removed we need to enter every single key 😄 you are the webdev, take a look 😅
Author
Owner

@BramSuurdje commented on GitHub (Feb 13, 2025):

i think the whole json page requires a re-write if i want to make this work. as of right now its a mess how state is handled. ill see when i can start refactoring it

@BramSuurdje commented on GitHub (Feb 13, 2025): i think the whole json page requires a re-write if i want to make this work. as of right now its a mess how state is handled. ill see when i can start refactoring it
Author
Owner

@bvdberg01 commented on GitHub (Mar 19, 2025):

Fixed with pr #3260

@bvdberg01 commented on GitHub (Mar 19, 2025): Fixed with pr #3260
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#481