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

Fixed image resizer for images with links #8809

Merged
merged 1 commit into from
Jan 12, 2021
Merged

Fixed image resizer for images with links #8809

merged 1 commit into from
Jan 12, 2021

Conversation

psmyrek
Copy link
Contributor

@psmyrek psmyrek commented Jan 12, 2021

Suggested merge commit message (convention)

Fix (image): Fixed image resizer for images with links. Closes #8749.

@niegowski niegowski self-requested a review January 12, 2021 09:22
// The resizer must be attached only to images loaded by the `ImageInsert` or `ImageUpload` plugins.
if ( !domEvent.target.matches( 'figure.image.ck-widget > img' ) ) {
// The resizer must be attached only to images loaded by the `ImageInsert`, `ImageUpload` or `LinkImage` plugins.
if ( !domEvent.target.matches( 'figure.image.ck-widget > img, figure.image.ck-widget > a > img' ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I know that I suggested this solution, but I'm wondering now if we could check if this img DOM node has a mapping to view and model elements. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, no idea what kind of consequences this change will have and whether it covers all cases...

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm seems that img element itself has no mapping to model element. Ok let's leave it this way for now.

@niegowski niegowski merged commit abd2c67 into master Jan 12, 2021
@niegowski niegowski deleted the i/8749 branch January 12, 2021 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image resizer doesn't work with LinkImage
2 participants