summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Fregante <opensource@bfred.it> 2020-05-11 16:36:01 +0200
committerGravatar GitHub <noreply@github.com> 2020-05-11 16:36:01 +0200
commita2d4b7e763d018ff7a843a92f7b685ea0e672ccc (patch)
tree4ea2e26b1b5e4e11dda66791a0ea00001e032554
parent4348e5dbab2552afaed03cc8cb81459c130ace96 (diff)
downloadrefined-github-a2d4b7e763d018ff7a843a92f7b685ea0e672ccc.tar.gz
refined-github-a2d4b7e763d018ff7a843a92f7b685ea0e672ccc.tar.zst
refined-github-a2d4b7e763d018ff7a843a92f7b685ea0e672ccc.zip
Fix position of `warning-for-disallow-edits` (#3079)20.5.11
-rw-r--r--source/features/warning-for-disallow-edits.tsx8
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());
}
}