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

DropKick errors out when not mounted on mobile. #318

Closed
nrdobie opened this issue Dec 23, 2015 · 2 comments
Closed

DropKick errors out when not mounted on mobile. #318

nrdobie opened this issue Dec 23, 2015 · 2 comments

Comments

@nrdobie
Copy link

nrdobie commented Dec 23, 2015

When using the new Dropkick(elem, {mobile: false}) configuration, DropKick will crash when calling methods that manipulate Dropkick like .refresh() and .dispose() on mobile. DropKick will attempt to remove itself even though it was never mounted causing an error.

The hack fix I found was to check that dropkick.data.elem.parentNode has a value before calling any of the DropKick functionality. This check should probably be added to DropKick before performing DOM manipulations or offer a function for users to easily check if DropKick was actually mounted.

@nrdobie nrdobie closed this as completed Dec 23, 2015
@nrdobie nrdobie reopened this Dec 23, 2015
@Robdel12 Robdel12 added the Bug label Apr 19, 2016
@Robdel12
Copy link
Owner

Hi @nrdobie! I can't replicate this issue. Here is a JSBin I used to try and replicate it: http://jsbin.com/zeruhum/2/edit?html,js,output

@Robdel12 Robdel12 added Investigate and removed Bug labels Apr 24, 2016
@Robdel12
Copy link
Owner

After doing more digging it seems this was fixed with #310

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

2 participants