Skip to content

Commit 70836de

Browse files
committed
πŸ› Ignore "Reference new issue" modals when quoting
1 parent 40cfb6e commit 70836de

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

β€ŽGithub_Reply_Comments/Github_Reply_Comments.user.jsβ€Ž

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@
6868
var commentText = "";
6969

7070
// Use raw comment when available.
71-
var commentForm = comment.querySelector(".js-comment-field");
71+
// Extra scope is needed to get the correct comment field, which is not an "Reference new issue" modal (with org rights).
72+
var commentForm = comment.querySelector(
73+
":scope > .js-comment-update .js-comment-field",
74+
);
7275
if (commentForm) {
7376
commentText = commentForm.value;
7477
}

β€ŽGithub_Reply_Comments/README.mdβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ reply button on an comment.
2020

2121
## Version History
2222

23+
- version **next**
24+
25+
- πŸ› Ignore "Reference new issue" modals when quoting.
26+
2327
- version **1.0.6**
2428

2529
- πŸ› Fix broken comment form. Fixes ([#168](https://github.com/jerone/UserScripts/issues/168)).

0 commit comments

Comments
Β (0)