fix(core): unexpected double-click behavior when selecting multiple options on all doc pages (#8461)

close AF-968
This commit is contained in:
JimmFly 2024-10-17 14:15:05 +00:00
parent 2f2e03d3f9
commit 8d3a543a81
No known key found for this signature in database
GPG Key ID: 126E0320FEB0D05C
4 changed files with 6 additions and 1 deletions

View File

@ -213,6 +213,7 @@ const CollectionListItemWrapper = forwardRef(
const commonProps = useMemo(
() => ({
role: 'list-item',
'data-testid': 'collection-list-item',
'data-collection-id': collectionId,
'data-draggable': draggable,

View File

@ -345,6 +345,7 @@ const PageListItemWrapper = forwardRef(
const commonProps = useMemo(
() => ({
role: 'list-item',
'data-testid': 'page-list-item',
'data-page-id': pageId,
'data-draggable': draggable,

View File

@ -61,7 +61,9 @@ const useItemSelectionStateEffect = () => {
if (
target.tagName === 'BUTTON' ||
target.tagName === 'INPUT' ||
(e.target as HTMLElement).closest('button, input, [role="toolbar"]')
(e.target as HTMLElement).closest(
'button, input, [role="toolbar"], [role="list-item"]'
)
) {
return;
}

View File

@ -198,6 +198,7 @@ const TagListItemWrapper = forwardRef(
const commonProps = useMemo(
() => ({
role: 'list-item',
'data-testid': 'tag-list-item',
'data-tag-id': tagId,
'data-draggable': draggable,