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

fix(components): prevent carousel from auto playing #14553

Merged
merged 1 commit into from
Oct 15, 2023

Conversation

cuongle-hdwebsoft
Copy link
Contributor

@cuongle-hdwebsoft cuongle-hdwebsoft commented Oct 15, 2023

prevent carousel from auto playing

closed #14524

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow contributing guide English | (中文 | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer to relative issues for your PR.

Description

🤖 Generated by Copilot at 88f2ce6

Fixed a bug in use-carousel.ts that ignored the pauseOnHover prop of the carousel component. This improves the user experience and accessibility of the carousel.

Related Issue

Fixes #14524

Explanation of Changes

🤖 Generated by Copilot at 88f2ce6

  • Fix a bug where the carousel would resume autoplaying after the mouse leaves, even if pauseOnHover is true (link)

@pull-request-triage
Copy link

👋 @cuongle-hdwebsoft, thank you for contributing element-plus.

  • You can comment with /label Components:[component_name] to add a label for which component you are working on.
  • You may join our Discord for staying tuned.

@github-actions
Copy link

Hello @cuongle-hdwebsoft, thank you for contributing to element-plus, please see our guideline to see how to make contribution

@github-actions
Copy link

github-actions bot commented Oct 15, 2023

@github-actions github-actions bot added the CommitMessage::Qualified Qualified commit message label Oct 15, 2023
@github-actions
Copy link

🧪 Playground Preview: https://element-plus.run/?pr=14553
Please comment the example via this playground if needed.

@cuongle-hdwebsoft
Copy link
Contributor Author

cuongle-hdwebsoft commented Oct 15, 2023

Here is demo

Testing step:

  • Click on the next arrow icon
  • Confirm that it should display the next carousel item and automatically play the next item.
  • Move your mouse out of the carousel
  • Confirm that it should auto-play again
CleanShot.2023-10-15.at.14.05.56.mp4

Copy link
Collaborator

@btea btea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@btea btea merged commit cea19ac into element-plus:dev Oct 15, 2023
13 checks passed
cc-hearts pushed a commit to cc-hearts/element-plus that referenced this pull request Oct 15, 2023
@element-bot element-bot mentioned this pull request Oct 18, 2023
3 tasks
consultation-applio pushed a commit to consultation-applio/element-plus that referenced this pull request Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Component] [carousel, carousel-item] Carousel设置pause-on-hover为true时 点击左右箭头切换后失效
3 participants