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

Image sliders (Otter and Smart Slider 3) in header widget not visible in mobile view #4092

Open
mark-orion opened this issue Sep 11, 2023 · 2 comments · Fixed by Codeinwp/otter-blocks#1906
Assignees
Labels
bug This label could be used to identify issues that are caused by a defect in the product. small (1-3h) This label is used for issues that can be completed within 3 hours or less.

Comments

@mark-orion
Copy link

mark-orion commented Sep 11, 2023

Description

Sliders (Otter slider and Smart Slider 3) are not visible in mobile view. The area is just left blank.

Step-by-step reproduction instructions

  1. Install Smart Slider 3 for Otter
  2. Create a slider and add it to the header in mobile view.
  3. Slider will be displayed in the preview but not on an actual mobile device.
  4. If the mobile browser supports desktop view, then the slider is visible if that option is selected.

Screenshots, screen recording, code snippet or Help Scout ticket

No response

Environment info

https://pastebin.com/pypgtzmm

Is the issue you are reporting a regression

No

@mark-orion mark-orion added the bug This label could be used to identify issues that are caused by a defect in the product. label Sep 11, 2023
@cristian-ungureanu cristian-ungureanu added the small (1-3h) This label is used for issues that can be completed within 3 hours or less. label Sep 18, 2023
@cristian-ungureanu
Copy link
Contributor

cristian-ungureanu commented Sep 20, 2023

@HardeepAsrani I've tried to fix this but I couldn't.
The issue is the same as this one: Codeinwp/otter-blocks#1750. Because the Otter slider is loaded in a grid/flex container the resize algorithm of Glide doesn't work as expected. The issue is reported on Glide's repository: glidejs/glide#534 but no fix so far.

Here's what I've tried:

  1. Updating Glide script in Otter to the latest version - no result
  2. Adding this piece of code:
.wp-block-themeisle-blocks-slider {
    display: grid;
}

Here the fix seems to work but if you resize the window and switch between mobile and desktop header, when you get back to mobile the slider breaks again

Regarding Smart Slider 3, I could replicate the issue only if another slider was loading on the same page. It appears that this is a limitation of the plugin ( https://wordpress.org/support/topic/multiple-slides-simultaneously/ ). Maybe that's why our user mentioned it too.

@HardeepAsrani
Copy link
Member

@cristian-ungureanu We have a frontend script that we add to Glide, will it be possible to add the CSS logic there and listen for resize change? https://github.com/Codeinwp/otter-blocks/blob/master/src/blocks/frontend/slider/index.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This label could be used to identify issues that are caused by a defect in the product. small (1-3h) This label is used for issues that can be completed within 3 hours or less.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants