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
I'm making a kind of web app/desktop hybridy thing where all of the "pages" are on one html doc that shows and hides the elements as necessary. I noticed that when a drag element with inertia is flung (setting the resistance very low makes it more noticeable) and the element is hidden while the drag is still moving, the entire library stops functioning.
The culprit is the "setRestriction" method where it looks for the x and y elements in the restriction object. Because for some reason (probably the element being hidden) the restriction is undefined at that point.
The workaround I have now is to put
if (!restriction)
{
return status;
}
before it looks for the x and y element in the restriction object. Don't want to make a pull request at this time because I'm not tooooootally sure that this fix doesn't also break something else.
The text was updated successfully, but these errors were encountered:
I wasn't sure if that would work either so I went with a safer option of setting the restrictedX/Y to be page.x/y and then do the rest of the status checks as normal. Thanks for having a look at it.
I'm making a kind of web app/desktop hybridy thing where all of the "pages" are on one html doc that shows and hides the elements as necessary. I noticed that when a drag element with inertia is flung (setting the resistance very low makes it more noticeable) and the element is hidden while the drag is still moving, the entire library stops functioning.
The culprit is the "setRestriction" method where it looks for the x and y elements in the restriction object. Because for some reason (probably the element being hidden) the restriction is undefined at that point.
The workaround I have now is to put
before it looks for the x and y element in the restriction object. Don't want to make a pull request at this time because I'm not tooooootally sure that this fix doesn't also break something else.
The text was updated successfully, but these errors were encountered: