Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BL-12820 fix double click selecting books in collections tab #6176

Draft
wants to merge 1 commit into
base: Version5.6
Choose a base branch
from

Conversation

nabalone
Copy link
Contributor

@nabalone nabalone commented Oct 30, 2023

We may need to discuss whether this is the robust enough, what is the right approach, and whether 200ms is the right amount of delay. See https://stackoverflow.com/questions/25777826/onclick-works-but-ondoubleclick-is-ignored-on-react-component


This change is Reviewable

@andrew-polk
Copy link
Contributor

src/BloomBrowserUI/collectionsTab/BookButton.tsx line 344 at r1 (raw file):

                event.stopPropagation();
            }, 200);
        } else if (event.detail === 2) {

Should this be event.detail >= 2?

Copy link
Contributor

@andrew-polk andrew-polk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @nabalone)


src/BloomBrowserUI/collectionsTab/BookButton.tsx line 329 at r1 (raw file):

    const handleClick = (event: React.MouseEvent<HTMLElement>) => {
        if (event.detail === 1) {

Let's comment about what this is all about.


src/BloomBrowserUI/collectionsTab/BookButton.tsx line 451 at r1 (raw file):

                size="large"
                title={props.book.folderPath}
                onDoubleClick={handleDoubleClick}

Maybe leave this here, commented, with a comment explaining the situation (or pointing to comments on handleClick?

@andrew-polk andrew-polk marked this pull request as draft November 1, 2023 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants