mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
fix(core): unexpected double-click behavior when selecting multiple options on all doc pages (#8461)
close AF-968
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user