Opened 7 years ago

Last modified 7 years ago

#16753 closed Bug

element.setSize doesn't play well with hdpi — at Initial Version

Reported by: Marek Lewandowski Owned by:
Priority: Normal Milestone: CKEditor 4.6.2
Component: General Version:
Keywords: Cc:

Description

This come out from #14630.

There as a failing test:

Error details for tests/plugins/maximize/maximize
test maximize fire resize event with proper properties
Width should be restored.
Expected: 200 (number)
Actual:   202 (number)

When I started to investigate what's the cause of this - it took me all the way to setSize method, and then marginAndPaddingSize function.

The problem there was that resize plugin was setting editor size, using box model so that border width should be included as a part of with. But it did not consider that the width might ba a fraction of a pixel, as a result in mentioned test border width was something like ~0.9px - but it used it as 0px. Having width attribute set to 200px (because border were skipped) and including the border, the actual width of the element was 202px.

Change History (0)

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy