Collected a bunch of small fixes for 1.2.1:
- The behavior doesn't use once(), so sliders get mounted again after every AJAX request (Views pager, exposed filters).
- The library reads drupalSettings but doesn't depend on core/drupalSettings, so on pages where nothing else loads it the slider doesn't start. glide_external should be a dependency as well.
- The CDN URLs have no version, so we always get the latest Glide.js. Pinning to 3.7.1.
- focus_at is sent as a string, should be an int unless it's "center".
- Autoplay with an empty speed ends up as 0, which Glide treats as off. Setting a default of 3000 and making the field required when autoplay is on.
- The #attributes set in GlideStyle::render() are never rendered (the template prints them anyway), removing them.
- The arrow buttons are missing type="button" and an aria-label.
AI disclosure: the review and the patch were done with help from Claude. I reviewed and tested everything locally before committing.
Comments
Comment #2
junkunczComment #3
junkunczComment #4
junkunczComment #7
junkunczComment #9
junkuncz