diff options
-rw-r--r-- | source/features/warning-for-disallow-edits.tsx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/features/warning-for-disallow-edits.tsx b/source/features/warning-for-disallow-edits.tsx index 0c86d307..2231a401 100644 --- a/source/features/warning-for-disallow-edits.tsx +++ b/source/features/warning-for-disallow-edits.tsx @@ -17,11 +17,9 @@ function update(checkbox: HTMLInputElement): void { if (checkbox.checked) { getWarning().remove(); } else { - // Select every time because the sidebar content may be replaced - select(` - .new-pr-form .timeline-comment, - #partial-discussion-sidebar .js-collab-form + .js-dropdown-details - `)!.after(getWarning()); + checkbox + .closest('.timeline-comment, .discussion-sidebar-item > .d-inline-flex')! + .after(getWarning()); } } |