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
Remove the mouseup event lister and use the click away directive.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
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
mouseup
event lister and use the click away directive.Fixes https://linear.app/chatwoot/issue/CW-3282/phonenumberinput-country-undefined-in-onselectcountry
Type of change
How Has This Been Tested?
Steps
Checklist: