This issue is closed but still not working because the variable "o" is matched to drupalSettings.slick and however it should have been cloned since it is an object and therefore the reference for each slick slider instance of the page persists. With this patch the problem seems to be solved.

Comments

aarnau created an issue. See original summary.

aarnau’s picture

Issue summary: View changes
gausarts’s picture

Category: Bug report » Support request
Status: Active » Closed (duplicate)

Thank you! Not sure I understand what your problem is, but glad to hear it solved it.

The referenced thread already solved the issue, feel free to re-open even with extra solutions to avoid similar/dup issues.

d70rr3s’s picture

Category: Support request » Bug report
Status: Closed (duplicate) » Needs review

Hi @gausarts I think you went to fast here. The problem is that #3026879: Unslick issue: Dots are not assigned to the proper slick slider when multiple slick are on the page does not solve the issue neither for 1.x nor 1.1 versions and since is marked as fixed wich is not the state cannot be change so is why it's a regression.

Steps to reproduce:

  1. Download enable 1.1 or 1.x-dev version of slick
  2. Add two slicks for a content for example
  3. Set the second as unslick at desktop but to slick on medium breakpoints and set to it dots
  4. If you change the breakpoint you will see the dots attached to the first slick, instead the second

The issue (if you take a look closer to the patch you will see) is that the settings of each slick are overriden during initilization after the 'unslick' event is called because the drupalSettings passed down to are merged instead of being cloned in each iteration.

Please review the patch and since this is only affecting 1.x versions if you consider them not supported feel free to close the issue again.

Thanks

aarnau’s picture

StatusFileSize
new6.98 KB

I modified the patch because by mistake I had added a first version of the patch without modifying the minified javascript.

gausarts’s picture

Thank you!

I am sorry for being too fast. You were talking similar issues which were resolved. Now I think I got your point thanks to detailed explanations.

Would you mind starting with 2.x then we'll keep your previous patch for later backport so to not get lost? Thanks again.

igonzalez’s picture

#5 it works. Thanks

gausarts’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
Status: Needs review » Needs work

  • gausarts committed b20a567 on 8.x-2.x authored by aarnau
    Issue #3088244 by aarnau, d70rr3s, igonzalez: [Regression]: Dots are not...

  • gausarts committed c5aab41 on 8.x-1.x authored by aarnau
    Issue #3088244 by aarnau, d70rr3s, igonzalez: [Regression]: Dots are not...
gausarts’s picture

Status: Needs work » Fixed

Committed. Thank you for contribution!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.