mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-23 15:06:38 +03:00
fix(core): unexpected double-click behavior when selecting multiple options on all doc pages (#8461)
close AF-968
This commit is contained in:
parent
2f2e03d3f9
commit
8d3a543a81
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user