Owl Carousel is not working in Responsive (Mobile View)

Created on 27 October 2022, almost 2 years ago
Updated 24 August 2023, about 1 year ago

Hello dear project maintainers.

Problem/Motivation

I found a responsive display issue on some mobile devices.

Steps to reproduce

You can reproduce this problem in Android devices in the Chrome browser.

Proposed resolution

I suggest making changes to the file: /owlcarousel/js/owlcarousel.js

(function ($) {
  Drupal.behaviors.owl = {
    attach: function (context, settings) {
      $('.owl-slider-wrapper', context).each(function () {
        var $this = $(this);
        var $this_settings = $.parseJSON($this.attr('data-settings'));
        $this.owlCarousel($this_settings);
	});
    }
  };
})(jQuery);

to correct:

(function ($) {
  Drupal.behaviors.owl = {
    attach: function (context, settings) {
      $(window).on('load', function() {
          $('.owl-slider-wrapper', context).each(function () {
            var $this = $(this);
            var $this_settings = $.parseJSON($this.attr('data-settings'));
            $this.owlCarousel($this_settings);
          });
     });
    }
  };
})(jQuery);

User interface changes

I also suggest adding Tablet dimension to the interface.

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡·πŸ‡ΊRussia profwebsait

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024