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

Autogrow unexpectedly applies fixed width #4891

Closed
nag5000 opened this issue Sep 16, 2021 · 3 comments · Fixed by #4919
Closed

Autogrow unexpectedly applies fixed width #4891

nag5000 opened this issue Sep 16, 2021 · 3 comments · Fixed by #4919
Assignees
Labels
plugin:autogrow The plugin which probably causes the issue. regression This issue is a regression. status:confirmed An issue confirmed by the development team. type:bug A bug.
Milestone

Comments

@nag5000
Copy link

nag5000 commented Sep 16, 2021

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Go to https://ckeditor.com/docs/ckeditor4/latest/examples/autogrow.html (ckeditor v4.16.2 at the moment)
  2. Check that ckeditor container element doesn't have style="width: ...":
    2021-09-16_23-47
  3. Focus the editor and insert 3+ lines to trigger auto grow.
  4. Check the width again.

Expected result

ckeditor container element doesn't have style="width: ...".

Actual result

2021-09-16_23-52

Other details

  • Browser: Chrome 93.0.4577.63
  • OS: Linux
  • CKEditor version: 4.16.2
  • Installed CKEditor plugins: autogrow

Related issue: #4372

config.width = '100%' doesn't help.

@nag5000 nag5000 added the type:bug A bug. label Sep 16, 2021
@Comandeer
Copy link
Member

I can confirm the issue. It's connected with how CKEDITOR.editor#resize() method works – it requires both width and height even if we want to change only one of the dimensions. Probably the easiest fix would be to change this method's behaviour and add ability to change only one dimension.

@Comandeer Comandeer added size:S status:confirmed An issue confirmed by the development team. plugin:autogrow The plugin which probably causes the issue. labels Sep 17, 2021
@grumd
Copy link

grumd commented Sep 22, 2021

image

Issue is that autogrow should have used null instead of width here to not set fixed width.

Here's how resize plugin did it:

image

@CKEditorBot
Copy link
Collaborator

Closed in #4919

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:autogrow The plugin which probably causes the issue. regression This issue is a regression. status:confirmed An issue confirmed by the development team. type:bug A bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants