fix: tag input auto-submitting when pressing space (#1608)
This commit is contained in:
@@ -112,6 +112,8 @@ const SmartViewsListItem: FunctionComponent<Props> = ({ view, tagsState }) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
|
role="button"
|
||||||
|
tabIndex={0}
|
||||||
className={classNames('tag py-2 px-3.5 md:py-1', isSelected && 'selected', isFaded && 'opacity-50')}
|
className={classNames('tag py-2 px-3.5 md:py-1', isSelected && 'selected', isFaded && 'opacity-50')}
|
||||||
onClick={selectCurrentTag}
|
onClick={selectCurrentTag}
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@@ -202,7 +202,9 @@ export const TagsListItem: FunctionComponent<Props> = observer(({ tag, features,
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<button
|
<div
|
||||||
|
role="button"
|
||||||
|
tabIndex={0}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
'tag py-2 px-3.5 focus:shadow-inner md:py-1',
|
'tag py-2 px-3.5 focus:shadow-inner md:py-1',
|
||||||
isSelected && 'selected',
|
isSelected && 'selected',
|
||||||
@@ -272,7 +274,7 @@ export const TagsListItem: FunctionComponent<Props> = observer(({ tag, features,
|
|||||||
<div className={`meta ${hasAtLeastOneFolder ? 'with-folders' : ''}`}>
|
<div className={`meta ${hasAtLeastOneFolder ? 'with-folders' : ''}`}>
|
||||||
{tag.conflictOf && <div className="danger text-[0.625rem] font-bold">Conflicted Copy {tag.conflictOf}</div>}
|
{tag.conflictOf && <div className="danger text-[0.625rem] font-bold">Conflicted Copy {tag.conflictOf}</div>}
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</div>
|
||||||
{isAddingSubtag && (
|
{isAddingSubtag && (
|
||||||
<div
|
<div
|
||||||
className="tag overflow-hidden"
|
className="tag overflow-hidden"
|
||||||
|
|||||||
Reference in New Issue
Block a user