Opened 7 years ago

Closed 5 years ago

#6308 closed Bug (fixed)

"vertical" resize_dir still sets width CSS

Reported by: Leonard Lee Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.6.3
Component: UI : Toolbar Version: 3.4
Keywords: Cc: mcianc@…

Description (last modified by Krzysztof Studnik)

When resize_dir is configured to be "vertical", only vertical size changes should be allowed. However, after some vertical resizing, a width CSS style (in px) is set on the editor span. For example:

style="width:1019px"

This is a problem if the editor is supposed to be 100% wide. The editor is now stuck at being the same width, even when the window/container resizes.

The same issue probably applies to "horizontal" resize_dir, but with a height CSS style.

Both issues can be fixed by changing the editor resize function call in resize/plugin.js line43 to:

  editor.resize( resizeHorizontal ? width : null, resizeVertical ? height : null );

This will cause the width/height to only be changed when necessary.

Attachments (1)

6308.patch (589 bytes) - added by Garry Yao 5 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 7 years ago by Krzysztof Studnik

Description: modified (diff)
Keywords: HasPatch added; resize removed
Status: newconfirmed

Confirmed. After applying provided change, editor resizes itself depending on window size

comment:2 Changed 7 years ago by Marco

Cc: mcianc@… added

comment:3 Changed 7 years ago by Krzysztof Studnik

linked with #6565

comment:4 in reply to:  3 Changed 7 years ago by Krzysztof Studnik

Replying to krst:

linked with #6565

I linked this with wrong issue, it should be #6365

comment:5 Changed 6 years ago by Freddie Bingham

The suggested fix works, let's get this in.

Changed 5 years ago by Garry Yao

Attachment: 6308.patch added

comment:7 Changed 5 years ago by Garry Yao

Component: GeneralUI : Toolbar
Keywords: HasPatch removed
Owner: set to Garry Yao
Status: confirmedreview

We dont need to fix the horizontal-only resize since percentage val is not supported for editor height.

comment:8 Changed 5 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.6.3
Status: reviewreview_passed

Please fix the coding style when committing.

comment:9 Changed 5 years ago by Garry Yao

Resolution: fixed
Status: review_passedclosed

Fixed with [7386].

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy