carbon-design-system / carbon-for-ibm-dotcom

Carbon for IBM.com is based on the Carbon Design System for IBM
https://www.ibm.com/standards/carbon/
Apache License 2.0
264 stars 157 forks source link

[Carousel]: Carousel scrolls to empty page if clicked a second time - DDS consulting #7605

Closed dratzenboeck-ibm closed 2 years ago

dratzenboeck-ibm commented 2 years ago

Engineering info:


Description

When clicking a jump link or a video link inside the carousel you stay on the same page. After closing the video / scrolling back to the carousel and clicking another link, the carousel scrolls to an empty page. It seems to scroll to a page 0, because the page indicator says "0/3" for example.

Component(s) impacted

https://www.ibm.com/standards/carbon/web-components/?path=/story/components-carousel--cards-with-images

https://user-images.githubusercontent.com/85555103/140490627-97d9f445-28a5-4fa3-a708-de72e7832124.mp4

I tried around a bit and it seems to be caused by using the <dds-video-cta-container> inside the carousel, but this was suggested to us after this issue https://github.com/carbon-design-system/carbon-for-ibm-dotcom/issues/6339

Browser

Chrome

Carbon for IBM.com version

1.26.0

Severity

Severity 3 = The problem is visible or noticeable to users but does not impede the usability or functionality. Affects minor functionality, has a workaround.

Application/website

Afterburner Adobe CMS

Package

@carbon/ibmdotcom-web-components, @carbon/ibmdotcom-styles

CodeSandbox example

https://codesandbox.io/s/nostalgic-liskov-k2o16?file=/index.html

Steps to reproduce the issue (if applicable)

  1. Click on a video cta or jump cta inside the carousel
  2. Go back to the same carousel
  3. Click on any other link
  4. The link will not work as expected and only scroll the carousel to page 0

No response

Release date (if applicable)

No response

Code of Conduct

emyarod commented 2 years ago

related #6372