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

drag test helper division by 0 #513

Open
Yelinz opened this issue Mar 17, 2023 · 0 comments
Open

drag test helper division by 0 #513

Yelinz opened this issue Mar 17, 2023 · 0 comments

Comments

@Yelinz
Copy link

Yelinz commented Mar 17, 2023

Describe the bug
drag test helper can produce a division by 0, which causes an error for triggerEvent because the value is Infinity

To Reproduce
Reproduction unsure, but only seems to happen in headless test mode.

Expected behavior
Avoid the division by 0

Additional context
The offending line

  const scale = clientHeight / (rect.bottom - rect.top);

https://github.com/adopted-ember-addons/ember-sortable/blob/master/addon/src/test-support/helpers/drag.js#L61

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

No branches or pull requests

1 participant