Opened 11 years ago
Closed 11 years ago
#11783 closed Bug (fixed)
Link in image caption is taken as link which wraps image
Reported by: | Piotrek Koszuliński | Owned by: | Olek Nowodziński |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.4.0 |
Component: | General | Version: | 4.4.0 |
Keywords: | Drupal | Cc: | wim.leers@… |
Description
In image2 sample load:
<figure class="image"><img alt="Saturn V" src="assets/image1.jpg" width="200" /> <figcaption>Roll out <a href="x">of Saturn V</a> on launch pad</figcaption> </figure>
Kaboom! The issue is caused by widget.parts.link discovering the link inside figcaption.
Change History (5)
comment:1 Changed 11 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 11 years ago by
Cc: | wim.leers@… added |
---|---|
Keywords: | Drupal added |
comment:3 follow-up: 4 Changed 11 years ago by
Owner: | set to Olek Nowodziński |
---|---|
Status: | confirmed → review |
It could be solved with the following selector if IE8 supported :not()
:
link: 'a[data-widget],*:not(figcaption)>a'
But it does not. Fix pushed to branch:t/11783 (tests).
comment:4 Changed 11 years ago by
Replying to a.nowodzinski:
It could be solved with the following selector if IE8 supported
:not()
:link: 'a[data-widget],*:not(figcaption)>a'But it does not. Fix pushed to branch:t/11783 (+tests).
comment:5 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | review → closed |
Thanks. R+, merged to major with git:e20ae7b on dev and 2a75dd9 on tests.
I found and reported this.
And I think I've found the solution.
In the
image2
plugin's widget definition:The
widget
plugin'ssetupParts()
function callsThis selects any
a
element inside the widget. Which causes the wronga
to be selected: the one in the caption.So the solution is super simple: just update the selector!