fix: Fixed issue where search options weren't selectable on macOS

This commit is contained in:
Aman Harwara
2023-11-20 21:34:51 +05:30
parent 7facbab322
commit b377f9cba7
2 changed files with 9 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
import { classNames } from '@standardnotes/snjs'
import { FunctionComponent } from 'react' import { FunctionComponent } from 'react'
type Props = { type Props = {
@@ -13,9 +14,14 @@ const styles = {
} }
const Bubble: FunctionComponent<Props> = ({ label, selected, onSelect }) => ( const Bubble: FunctionComponent<Props> = ({ label, selected, onSelect }) => (
<span role="tab" className={`${styles.base} ${selected ? styles.selected : styles.unselected}`} onClick={onSelect}> <button
role="checkbox"
aria-checked={selected}
className={classNames(styles.base, selected ? styles.selected : styles.unselected)}
onClick={onSelect}
>
{label} {label}
</span> </button>
) )
export default Bubble export default Bubble

View File

@@ -15,7 +15,7 @@ const SearchOptions = ({ searchOptions }: Props) => {
}, [searchOptions]) }, [searchOptions])
return ( return (
<div role="tablist" className="mt-3 flex flex-wrap gap-2" onMouseDown={(e) => e.preventDefault()}> <div className="mt-3 flex flex-wrap gap-2" onMouseDown={(e) => e.preventDefault()}>
<Bubble <Bubble
label="Protected Contents" label="Protected Contents"
selected={includeProtectedContents} selected={includeProtectedContents}