Carousel: do not open modal when clicking on a link in a caption#11024
Carousel: do not open modal when clicking on a link in a caption#11024
Conversation
Fixes #10997 The new Core gallery block introduces a different markup for captions. This PR makes sure that when clicking on a link in a caption inside a core gallery, you get redirected to that link, instead of having the Carousel modal open.
|
D22601-code. (newly created revision) |
|
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: January 10, 2019. |
brbrr
left a comment
There was a problem hiding this comment.
Works well! ![]()
One thing I noticed, which probably not related to this PR - when closing carousel modal via 'X' button - I get redirected back to wp-admin (which is my previous page)
zinigor
left a comment
There was a problem hiding this comment.
Code looks good, works as expected!
|
Thanks for the reviews. Merging.
Yep, that's #6244 |
* Add first version of the Changelog and testing list for 6.9 * Changelog: add #10710 * changelog: add #10538 * changelog: add #10741 * changelog: add #10749 * changelog: add #10664 * changelog: add #10224 * changelog: add #10788 * Changelog: add #10560 * Chanegelog: add #10812 * changelog: add #10556 * Changelog: add #10668 * Changelog: add #10846 * Changelog: add #10947 * Changelog: add #10962 * Changelog: add #10956 * Changelog: add #10940 * Changelog: add #10934 * Changelog: add #10912 * changelog: add #10866 * changelog: add #10924 * Changelog: add #10936 * Changelog: add #10833 * changelog: add #10867 * Changelog: add #10960 * Changelog: add #10888 * changelog: add #10840 * changelog: add #10972 * Changelog: add #10979 * changelog: add #10909 * Changelog: add #10958 * Changelog: add #10981 * Changelog: add #10564 * Changelog: add #10809 * Changelog: add #10982 * Changelog: add #10706 * Changelog: add #10978 * Changelog: add #10132 * Changelog: add #11022 * Changelog: add #11024 * Changelog: add #10875 * Changelog: add #11030 * Changelog: add #11053 * Changelog: add #10880 * Changelog: add #9359 * Changelog: add #11037 * Update block list * Changelog: add #11060 * Changelog: add #10755 * changelog: add #11000 * Changelog: add #10786 * Changelog: add #10945 * Changelog: add #10597
Fixes #10997
Changes proposed in this Pull Request:
The new Core gallery block introduces a different markup for captions.
This PR makes sure that when clicking on a link in a caption inside a core gallery, you get redirected
to that link, instead of having the Carousel modal open.
Testing instructions:
Start from a site with the Carousel module active, and running WP 5.0+
Create a new gallery using the Gallery block.
Add a caption to one of your images, with a link like so:

Publish your post
View post.
Click on the link in the caption.
Make sure you are redirected to the link location, instead of having the Carousel modal open.
Check that clicking on the image itself works.
Proposed changelog entry for your changes: