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: dialog allows resizing beyond minimum allowed size #2673

Closed
engineering-this opened this issue Dec 12, 2018 · 4 comments
Closed

image2: dialog allows resizing beyond minimum allowed size #2673

engineering-this opened this issue Dec 12, 2018 · 4 comments
Labels
plugin:image2 The plugin which probably causes the issue. resolution:by-design Described behavior is a part of feature design and is not expected to be changed. type:bug A bug.

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. Double click on image to open dialog.
  4. Enter values:
    width: 1
    height: 1
  5. Press OK.

Expected result

Alert appears saying that minimum allowed width/height is 15px.

Actual result

Dialog validation passes and image is very small.

Other details

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

Image resizer can resize to minimum 15px width/height, however image dialog doesn't implement this in any way.

  • 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

engineering-this commented Dec 12, 2018

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

@mlewand
Copy link
Contributor

mlewand commented Dec 12, 2018

Why would you want it to restrict you from setting such size? By default the plugin does not care about that.

@mlewand mlewand added status:pending and removed status:confirmed An issue confirmed by the development team. labels Dec 12, 2018
@engineering-this
Copy link
Contributor Author

Resize handler restricts width/height to not less than 15px, see:

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

So at first I realised it should have same limitations when using dialog.

@mlewand
Copy link
Contributor

mlewand commented Dec 12, 2018

Well these two things aren't really related. So unless there's no dedicated config feature, the dialog should allow for whatever dummy value the user sets.

@mlewand mlewand closed this as completed Dec 12, 2018
@mlewand mlewand added resolution:by-design Described behavior is a part of feature design and is not expected to be changed. and removed status:pending labels Dec 12, 2018
@engineering-this engineering-this removed their assignment Dec 17, 2018
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. resolution:by-design Described behavior is a part of feature design and is not expected to be changed. type:bug A bug.
Projects
None yet
Development

No branches or pull requests

2 participants