Skip to content

Code Block Editing not working when in popout window #19

@elrindir

Description

@elrindir

Describe the bug
The Code Block Editing feature as of v1.1.0 is not working in Obsidian's built-in pop-out window.

To Reproduce

  • Create a new note
  • Write a code block and some code
  • Press Ctrl + P
  • select "Open current tab in new window"
  • navigate to the new window
  • right click on the code block
  • click "Edit Code Block in Monaco Editor"
  • editor modal opens
  • no content is displayed, changes have no effect

Expected behavior

  • editor modal opens in pop-out window
  • content of the codeblock is displayed
  • changes are applied to the codeblock after closing the editor

Screenshots
grafik
grafik

Additional context
Additional details:

  • Tested only on Desktop
  • Windows 10, Obsidian v1.4.16
  • I've noticed some other plugins, which were also broken in pop-out windows. For example see here.
  • Also, when the editor modal is open in the pop-out window, hotkeys do not work in the main Obsidian window. After closing the modal, hotkeys are fine again.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions