biati-digital / glightbox

Pure Javascript lightbox with mobile support. It can handle images, videos with autoplay, inline content and iframes
MIT License
2.03k stars 228 forks source link

mobile pre description is making display error #430

Closed leccyril closed 1 year ago

leccyril commented 1 year ago

Describe the bug on mobile mode the inner description is pasting title and text with no space making issue in the reading

Are you able to reproduce the bug in the demo site Yes

To Reproduce Steps to reproduce the behavior: set inner description with

tag and

tag

Expected behavior Title should not taken in the resume of description

Post the code you are using Help me solve issues faster, if I can copy paste your code I can try to reproduce and fix the bug faster.

Screenshots If applicable, add screenshots to help explain your problem. here content of description : image

and the first display we can see concatenated text

image

Smartphone: any smartphone

gingerchew commented 1 year ago

@leccyril Can you add a codepen or similar? The description is stripped of HTML for compatibility and to prevent formatting errors.

leccyril commented 1 year ago

Hello, to be more explicit, we could not choose the mobile display if we juste want to display picture and image on click

https://enatawheels.com/#SectionEnata9

in mobile mode.

For the initial issue i set title in data instead of directly in the html div, but if you change title or description css it will change in boht views (the concatenated one and the other)

gingerchew commented 1 year ago

Okay, let me rephrase. Can you give a codepen or something similar with a reduced test case?

leccyril commented 1 year ago

link here

  1. the mobile mode when we have to click "see more" to see the text is useless because we click on the picture then we only see title and 1 sentence..... we should be able to choose if we want this and on click directly display the content description
  2. the style applied on the description will be also applied on the "see more" display so it is impossible to set style for the first display and then for the full display

we should be able to choose or not (just display full text directly)

gingerchew commented 1 year ago

Okay, I see now. What you are trying to do is not possible with the description property by design. You would want to use an inline slide to get the desired effect.