You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 27, 2021. It is now read-only.
isUnderThreshold() doesn't check if the variable this.thresholdAmount exists before computing and ends up returning false when the card hasn't moved, when should return true if anything (if the card hasn't moved yet this.thresholdAmount is undefined).
My use case: I'm using the plug-in with a list of cards (not a "stack"). To do that I create a stack with just one card for each card. I modified the plug-in to use only dragright and dragleft to use only horizontal dragging and allow scrolling. But when I scroll the page, a dragend event is fired and since the card didn't move at all there is no this.thresholdAmount and the value of calling isUnderThreshold() is false. That triggers the onDestroy handler (in my case removing the card) while the card didn't even moved.
I'm submitting a PR to solve this.
The text was updated successfully, but these errors were encountered:
isUnderThreshold()
doesn't check if the variablethis.thresholdAmount
exists before computing and ends up returningfalse
when the card hasn't moved, when should returntrue
if anything (if the card hasn't moved yetthis.thresholdAmount
isundefined
).My use case: I'm using the plug-in with a list of cards (not a "stack"). To do that I create a stack with just one card for each card. I modified the plug-in to use only dragright and dragleft to use only horizontal dragging and allow scrolling. But when I scroll the page, a dragend event is fired and since the card didn't move at all there is no
this.thresholdAmount
and the value of callingisUnderThreshold()
isfalse
. That triggers theonDestroy
handler (in my case removing the card) while the card didn't even moved.I'm submitting a PR to solve this.
The text was updated successfully, but these errors were encountered: