Skip to content

Commit 1582d5f

Browse files
committed
Only enhance textareas with the correct id.
1 parent 1224ba4 commit 1582d5f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

browser-extension/src/lib/enhancers/github/githubIssueAddComment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class GitHubIssueAddCommentEnhancer implements CommentEnhancer<GitHubIssu
1717
}
1818

1919
tryToEnhance(_textarea: HTMLTextAreaElement): GitHubIssueAddCommentSpot | null {
20-
if (window.location.hostname !== 'github.com') {
20+
if (window.location.hostname !== 'github.com' || _textarea.id !== ':r2v:') {
2121
return null
2222
}
2323

@@ -50,7 +50,7 @@ export class GitHubIssueAddCommentEnhancer implements CommentEnhancer<GitHubIssu
5050
autoResize: true,
5151
minHeight: '100px',
5252
padding: 'var(--base-size-16)',
53-
placeholder: 'Add your comment here...',
53+
placeholder: 'Use Markdown to format your comment',
5454
})[0]!
5555
}
5656

browser-extension/src/lib/enhancers/github/githubPRAddComment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class GitHubPRAddCommentEnhancer implements CommentEnhancer<GitHubPRAddCo
1818

1919
tryToEnhance(_textarea: HTMLTextAreaElement): GitHubPRAddCommentSpot | null {
2020
// Only handle github.com domains TODO: identify GitHub Enterprise somehow
21-
if (window.location.hostname !== 'github.com') {
21+
if (window.location.hostname !== 'github.com' || _textarea.id !== 'new_comment_field') {
2222
return null
2323
}
2424

0 commit comments

Comments
 (0)