Skip to content

fix: Add safe navigation to arrow position calculation #901

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

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

carlssonemil
Copy link
Contributor

This pull request addresses an issue with the arrowPos calculation that throws a null reference error if the inputRect is undefined. This can happen when using the inline mode of the date picker.

I can't reproduce this in an isolated environment (e.g. jsfiddle) but it happens every time in our project. We've added a temporary work around with :config="{ arrowLeft: '0px' }".

Ideally, this computed calculation should not even need to run when in inline mode, but safe navigating inside it is also a viable solution to handle this issue.

Add safe navigation to arrow position calculation to prevent errors when
any of the elements in the calculation does not exist.
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