openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

OverflowToolbar - Resize not working with FlexLayout

Open ANMichael opened this issue 8 years ago • 2 comments

OpenUI5 version: 1.56.10 (probably can be reproduced in every version above 1.42.1)

Browser/version (+device/version):

Google Chrome Version 70.0.3538.67 (Offizieller Build) (64-Bit)

Any other tested browsers/devices(OK/FAIL):

Firefox 62.0.3 (64-Bit) - failed

URL (minimal example if possible):

Only working in one direction: https://jsfiddle.net/h3x2ksrg/1/ Not working at all: https://jsfiddle.net/h3x2ksrg/2/

Steps to reproduce the problem:

  1. Run JSFiddle
  2. Reduce window size until it is not possible to show every button fully
  3. Increase window size again, until all buttons can be viewed fully

What is the expected result?

The OverflowToolbarButtons should be hidden (in the ... menu) once there is not enough space and should reappear once there is enough space.

What happens instead?

Only working in one direction: The OverflowToolbarButtons do disappear in the ... menu but do not reappear. Not working at all: The Overflow ToolbarButtons do not disappear in the ... menu

Any other information? (attach screenshot if possible)

If you use an OverflowToolbar to show OverflowToolbarButtons the resize is either not working at all, or only in one direction, depending on the implementation. This is due to this line of code.

Once you set a fixed width (for example 600px) the resizeHandler is not registered because it is not a relative width. However in a FlexBox the width can change, making it relative. If you set a relative width explicitly at the OverflowToolbar (for example auto) then the resize will work while shrinking, but not while expanding, because auto uses the contents minimal space and thus no resize will be triggered when expanding.

Note: renderType is needed to make FlexBox work, see Issue #2253 .

ANMichael avatar Oct 22 '18 10:10 ANMichael

Hello @ANMichael ,

Thank you for sharing this finding. I've created an internal incident 1880649890. The status of the issue will be updated here in GitHub.

Regards, Georgi

ghristanov avatar Oct 24 '18 12:10 ghristanov

Hi,

You can set the width of the OverflowToolbar to "100%" and it will work correctly: https://jsfiddle.net/h3x2ksrg/27/

Best, Teo

TeodorTaushanov avatar Oct 26 '18 08:10 TeodorTaushanov