chore: fix tag options menu opening notes list [skip e2e]
This commit is contained in:
@@ -115,7 +115,7 @@ const SmartViewsListItem: FunctionComponent<Props> = ({ view, tagsState, setEdit
|
||||
<div
|
||||
role="button"
|
||||
tabIndex={FOCUSABLE_BUT_NOT_TABBABLE}
|
||||
className={classNames('tag group px-3.5', isSelected && 'selected', isFaded && 'opacity-50')}
|
||||
className={classNames('tag group px-3.5 py-1 md:py-0', isSelected && 'selected', isFaded && 'opacity-50')}
|
||||
onClick={selectCurrentTag}
|
||||
onContextMenu={(event) => {
|
||||
event.preventDefault()
|
||||
|
||||
@@ -30,7 +30,9 @@ const TagsList: FunctionComponent<Props> = ({ type }: Props) => {
|
||||
|
||||
const onContextMenu = useCallback(
|
||||
(tag: SNTag, posX: number, posY: number) => {
|
||||
void application.navigationController.setSelectedTag(tag, type)
|
||||
if (application.navigationController.selected !== tag) {
|
||||
void application.navigationController.setSelectedTag(tag, type)
|
||||
}
|
||||
openTagContextMenu(posX, posY)
|
||||
},
|
||||
[application, openTagContextMenu, type],
|
||||
|
||||
@@ -260,7 +260,11 @@ export const TagsListItem: FunctionComponent<Props> = observer(
|
||||
<div
|
||||
role="button"
|
||||
tabIndex={FOCUSABLE_BUT_NOT_TABBABLE}
|
||||
className={classNames('tag group px-3.5', isSelected && 'selected', isBeingDraggedOver && 'is-drag-over')}
|
||||
className={classNames(
|
||||
'tag group px-3.5 py-1 md:py-0',
|
||||
isSelected && 'selected',
|
||||
isBeingDraggedOver && 'is-drag-over',
|
||||
)}
|
||||
onClick={selectCurrentTag}
|
||||
ref={tagRef}
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user