Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 0 additions & 1 deletion web_src/css/modules/checkbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ input[type="checkbox"]:indeterminate::before {
cursor: auto;
position: relative;
display: block;
user-select: none;
}
Comment thread
silverwind marked this conversation as resolved.

.ui.checkbox label,
Expand Down
4 changes: 4 additions & 0 deletions web_src/js/modules/fomantic/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ export function initAriaCheckboxPatch() {
const input = el.querySelector('input');
if (!label || !input) continue;
linkLabelAndInput(label, input);
// prevent accidental text selection on double-click while allowing normal text selection
Comment thread
silverwind marked this conversation as resolved.
Outdated
label.addEventListener('mousedown', (e: MouseEvent) => {
if (e.detail === 2) e.preventDefault();
});
el.setAttribute('data-checkbox-patched', 'true');
}
}
Loading