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

Responsive extra with Turbolinks #64

Closed
enzinia opened this issue Jul 6, 2018 · 7 comments
Closed

Responsive extra with Turbolinks #64

enzinia opened this issue Jul 6, 2018 · 7 comments

Comments

@enzinia
Copy link
Contributor

enzinia commented Jul 6, 2018

I constantly have a repeated error in the console when resizing browser window:

Uncaught TypeError: Cannot read property 'forEach' of undefined
    at render (pagy.self-8fb09da8735807829df91dbb760bbd342dd9de76a6e68fa5d7da948200b00ea8.js?body=1:56)

Rails 5.2, Turbolinks 5.1.1

How to repeat:

  1. Use pagy responsive extra
  2. Call Pagy.init() in turbolinks:load event listener
  3. Switch page (go to link via Turbolinks)

The more we change the pages the faster the errors grow. Possibly related to binding events to window

responsive_with_turbolinks

@ddnexus
Copy link
Owner

ddnexus commented Jul 6, 2018

Yeah, I got that a few times too, but when I check it again the series[width] is not undefined anymore. Thanks for the step list, I will try to look into it soon

@ddnexus
Copy link
Owner

ddnexus commented Jul 7, 2018

@enzinia I tried it in a few browsers and I couldn't reproduce it. Please, could you share an app, or even just a HTML file with the javascript? I have no clue about why and when this happens.

@ddnexus
Copy link
Owner

ddnexus commented Jul 7, 2018

@enzinia
I still have to figure out how to refactor it to avoid the problem, but I found the cause. I don't need any app nor HTML file anymore. Thanks.

@ddnexus ddnexus added the WIP label Jul 7, 2018
@enzinia
Copy link
Contributor Author

enzinia commented Jul 7, 2018

Good to hear!

I'll also try to find way to fix it.

@ddnexus
Copy link
Owner

ddnexus commented Jul 7, 2018

@enzinia thanks but please, don't waste your time on this one since it will probably not be just an isolated fix but a refactoring of a few things that have to work together

@enzinia
Copy link
Contributor Author

enzinia commented Jul 7, 2018

Roger.

@alec-implicitdesign
Copy link

This bug seems to be back on the current master branch. It seems like the particular fix that was mentioned here was removed again in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants