tui.calendar icon indicating copy to clipboard operation
tui.calendar copied to clipboard

Incompatible with flex layout due to explicit heights

Open matthiasg opened this issue 6 years ago • 2 comments

Version

1.10.0

Development Environment

Chrome 71

Current Behavior

Likely due to rounding errors in the height calculation the calendar grows by up to 4 pixels every time it is re-rendered.

When placing the calendar on a webpage with vertical flex layout re-rendering causes changes to the explicit height set to the tui-full-calendar-vlayout-area. The function getSize ind domutil.js is doing the calculation.

re-render

Expected Behavior

Placing the calendar on the screen with vertical flex layout to ensure filling the screen should be possible on browsers with flex support. This could be opt-in to ensure backwards compatibility if so desired and would primarily only remove the explicit heights set and be replaced by using flex internally.

matthiasg avatar Jan 29 '19 16:01 matthiasg

The be more specific the calendar does not need to be auto resizing based on flex (which is not easily possible) . In this case we call render and it behaves weirdly when layouted per flex when render is called.

matthiasg avatar Feb 18 '19 07:02 matthiasg

Can also reproduce on flex layouts in FF 74 and 75.

As @matthiasg said, both growing with the flex container or just being there without mandatory growth is enough to trigger the bug, which in my case is a growth of exactly 5px with every call to render().

claudioap avatar Mar 16 '20 05:03 claudioap