Skip to content

Commit

Permalink
Merge pull request #455 from ckeditor/ghw/453-error-when-trying-to-ed…
Browse files Browse the repository at this point in the history
…it-issue-or-comment

Fixed an error thrown when attempting to edit a comment
  • Loading branch information
mlewand authored Jun 9, 2023
2 parents 946fb5b + 74ef77d commit df4d6a5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/app/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default class Editor {
* @type {HTMLElement}
* @memberOf MarkdownEditor#dom.panels
*/
markdown: root.querySelector( '.previewable-comment-form > file-attachment' ),
markdown: root.querySelector( '.previewable-comment-form file-attachment' ),

/**
* The preview panel.
Expand All @@ -149,9 +149,13 @@ export default class Editor {
preview:
root.querySelector(
// This one is used on New Issue and Add Comment.
'.previewable-comment-form > .js-preview-panel,' +
// This one is used on Edit Comment.
'.previewable-comment-form > .preview-content' )
'.previewable-comment-form .js-preview-panel,' +
// This one is used on Edit Comment (structure up to May 2023).
'.previewable-comment-form > .preview-content,' +
// Another selector for Edit Comment but this div looks rather buggy,
// so it might be that GH will clean this up soon, see
// https://github.com/ckeditor/github-writer/pull/455#discussion_r1224359359
'.previewable-comment-form > div > .preview-content' )
},

tabs: {
Expand Down

0 comments on commit df4d6a5

Please sign in to comment.