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
|
<div
|
||||||
role="button"
|
role="button"
|
||||||
tabIndex={FOCUSABLE_BUT_NOT_TABBABLE}
|
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}
|
onClick={selectCurrentTag}
|
||||||
onContextMenu={(event) => {
|
onContextMenu={(event) => {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|||||||
@@ -30,7 +30,9 @@ const TagsList: FunctionComponent<Props> = ({ type }: Props) => {
|
|||||||
|
|
||||||
const onContextMenu = useCallback(
|
const onContextMenu = useCallback(
|
||||||
(tag: SNTag, posX: number, posY: number) => {
|
(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)
|
openTagContextMenu(posX, posY)
|
||||||
},
|
},
|
||||||
[application, openTagContextMenu, type],
|
[application, openTagContextMenu, type],
|
||||||
|
|||||||
@@ -260,7 +260,11 @@ export const TagsListItem: FunctionComponent<Props> = observer(
|
|||||||
<div
|
<div
|
||||||
role="button"
|
role="button"
|
||||||
tabIndex={FOCUSABLE_BUT_NOT_TABBABLE}
|
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}
|
onClick={selectCurrentTag}
|
||||||
ref={tagRef}
|
ref={tagRef}
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
Reference in New Issue
Block a user