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

fix: Dashboard phone number input country undefined in onSelectCountry #9473

Merged
merged 3 commits into from
May 16, 2024

Conversation

iamsivin
Copy link
Member

@iamsivin iamsivin commented May 15, 2024

Pull Request Template

Description

This PR will fix this sentry issue

Issue
The root cause of this issue is the usage of keyboardEventListenerMixins. The key events are always active when the edit conversation modal is active, even if the country dropdown is not visible. So, if we press the enter key, this error will be thrown into the console.

Solution
Remove the use of keyboardEventListenerMixins and handle it directly in the Vue native key events. Also, always check if the dropdown is active.

Other changes

  1. Remove the mouseup event lister and use the click away directive.
  2. Use inline Tailwind css

Fixes https://linear.app/chatwoot/issue/CW-3282/phonenumberinput-country-undefined-in-onselectcountry

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Steps

  1. Open a conversation.
  2. And click the edit contact button
  3. And click the enter key
  4. Now you can see the error in the console

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link

linear bot commented May 15, 2024

@iamsivin iamsivin temporarily deployed to chatwoot-pr-9473 May 15, 2024 16:58 Inactive
@scmmishra scmmishra merged commit 5657473 into develop May 16, 2024
16 checks passed
@scmmishra scmmishra deleted the fix/CW-3282-dashboard branch May 16, 2024 03:46
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.

None yet

3 participants