Skip to content

fix: comment toggle shortcut not working in environment variable editors#4403

Open
amit-y11 wants to merge 1 commit into
Dokploy:canaryfrom
amit-y11:fix/env-editor-comment-shortcut
Open

fix: comment toggle shortcut not working in environment variable editors#4403
amit-y11 wants to merge 1 commit into
Dokploy:canaryfrom
amit-y11:fix/env-editor-comment-shortcut

Conversation

@amit-y11
Copy link
Copy Markdown
Contributor

What is this PR about?

Fix Cmd+/ or Ctrl+/ comment toggle shortcut not working in environment variable editors (properties language mode).

CodeMirror's toggleComment command requires commentTokens metadata (via languageData) to know which syntax to use for commenting. The properties language mode from @codemirror/legacy-modes does not export this metadata, unlike yaml, shell, and json modes which all include it. This caused Ctrl+/ to silently fail in all editors using language="properties" including environment variable editors, volume content, and more.

The fix adds languageData: { commentTokens: { line: "#" } } to the properties stream parser definition in the shared CodeEditor component, enabling # line comments via Ctrl+/ across all properties-mode editors in the app.

Checklist

Before submitting this PR, please make sure that:

  • You created a dedicated branch based on the canary branch.
  • You have read the suggestions in the CONTRIBUTING.md file https://github.com/Dokploy/dokploy/blob/canary/CONTRIBUTING.md#pull-request
  • You have tested this PR in your local instance. If you have not tested it yet, please do so before submitting. This helps avoid wasting maintainers' time reviewing code that has not been verified by you.

Issues related (if applicable)

closes #4402

Screenshots (if applicable)

@amit-y11 amit-y11 requested a review from Siumauricio as a code owner May 14, 2026 07:26
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keyboard shortcut for comment toggle not working in environment variable editors

1 participant