Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source/features/hide-comments-faster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function generateSubmenu(hideButton: Element): void {
const hideCommentForm = select('.js-comment-minimize', comment)!;

// Generate dropdown items
for (const reason of select.all('[name="classifier"] input:not([value=""])', comment)) {
for (const reason of select.all('[name="classifier"] option:not([value=""])', comment)) {
hideCommentForm.append(
<button
type="submit"
Expand All @@ -44,15 +44,15 @@ function generateSubmenu(hideButton: Element): void {

// Shows menu on top of mainDropdownContent when "Hide" is clicked;
// Hide it when dropdown closes.
// Uses `v-hidden` and `d-none` to avoid conflicts with `close-out-of-view-modals`
// Uses `v-hidden` to avoid conflicts with `close-out-of-view-modals`
function toggleSubMenu(hideButton: Element, show: boolean): void {
const dropdown = hideButton.closest('details')!;

// Native dropdown
select('details-menu', dropdown)!.classList.toggle('v-hidden', show);

// "Hide comment" dropdown
select('form.js-comment-minimize', dropdown)!.classList.toggle('d-none', !show);
select('form.js-comment-minimize', dropdown)!.classList.toggle('v-hidden', !show);
}

function resetDropdowns(event: delegate.Event): void {
Expand Down