[WEB-2201] fix:changed onClick to onMouseDown#5497
[WEB-2201] fix:changed onClick to onMouseDown#5497sharma01ketan wants to merge 1 commit intopreviewfrom
Conversation
WalkthroughThe change involves modifying the event handler for the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant AuthEmailForm
participant XCircle
User->>XCircle: Mouse Down
XCircle->>AuthEmailForm: Trigger Clear Email Input
AuthEmailForm->>AuthEmailForm: Clear Email Input Field
Tip We have updated our review workflow to use the Anthropic's Claude family of models. Please share any feedback in the discussion post on our Discord. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- web/core/components/account/auth-forms/email.tsx (1 hunks)
Additional comments not posted (1)
web/core/components/account/auth-forms/email.tsx (1)
72-72: LGTM!The change from
onClicktoonMouseDownis appropriate for the intended behavior of clearing the email input as soon as the user presses the mouse button on theXCirclecomponent. TheonMouseDownevent is triggered when a mouse button is pressed on an element, before theonClickevent, and doesn't require the mouse button to be released. This change enhances the responsiveness of the UI.
Changes:
Moved to onMouseDown from onClick, to prevent triggering other events while the button is "being clicked".
Screen.Recording.2024-09-02.at.9.31.48.PM.mov
Reference:
[WEB-2201]
Summary by CodeRabbit