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

image2: resizing to minimum size doesn't update dialogs values #2672

Closed
engineering-this opened this issue Dec 12, 2018 · 1 comment · Fixed by #2683
Closed

image2: resizing to minimum size doesn't update dialogs values #2672

engineering-this opened this issue Dec 12, 2018 · 1 comment · Fixed by #2683
Assignees
Labels
plugin:image2 The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. target:minor Any docs related issue that can be merged into a master or major branch. type:bug A bug.
Milestone

Comments

@engineering-this
Copy link
Contributor

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Open test http://localhost:1030/tests/plugins/image2/manual/resizer
  2. Scroll to last editor.
  3. Resize image to minimum size.
  4. Double click on image to open dialog.

Expected result

  • Dialogs fields match image properties.

Actual result

  • width and height are unset.

Other details

Look at code:
https://github.com/ckeditor/ckeditor-dev/blob/7c937e875c35b9bd333fcc5de9c0910a2584ad34/plugins/image2/plugin.js#L1317-L1322

This is the part of mousemove handler. When mouse moves decreasing image size, attributes of img element are changed, but widget.data is updated in mouseup handler only if updateData is set to true. So in this scenario image size is changed, but the second one of dimensions is lower than allowed updateData is overwritten with false and thus data is not updated, and dialog shows previews value.

  • Browser: …
  • OS: …
  • CKEditor version: …
  • Installed CKEditor plugins: …
@engineering-this engineering-this added type:bug A bug. status:confirmed An issue confirmed by the development team. plugin:image2 The plugin which probably causes the issue. labels Dec 12, 2018
@engineering-this engineering-this self-assigned this Dec 12, 2018
@engineering-this
Copy link
Contributor Author

I will fix this with #2048 as same logic should be applied on max size.

@mlewand mlewand added this to the 4.12.0 milestone Feb 8, 2019
@mlewand mlewand added the target:minor Any docs related issue that can be merged into a master or major branch. label Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:image2 The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. target:minor Any docs related issue that can be merged into a master or major branch. type:bug A bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants