SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.95k stars 1.23k forks source link

SVG disappears from sap.tnt.ToolHeader #3653

Closed firesharker closed 1 year ago

firesharker commented 1 year ago

OpenUI5 version: 1.108.0

Browser/version (+device/version): latest firefox

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

URL (minimal example if possible): jsfiddle reproducer

Steps to reproduce the problem:

  1. Open the reproducer
  2. If the toolbar is already overflowing and only the SAP logo is visible, enlarge the preview panel until no item remains in the overflow menu then refresh the page.
  3. Shrink the preview panel until the button goes to the overflow menu

What is the expected result? The two logos should always be visible even if the overflow menu appears.

What happens instead? The OpenUI5 logo disappears when the overfow menu appears. Sometimes the UI5 logo does not even show up or flashes once and disappears.

Any other information? The issue is that if the svg image does not have width (and height) property set on the root svg node, then the natural with of the image dom node will be 0 on firefox which is used to determine whether the image has been loaded correctly.

So currently svgs like this do not work: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 92 45"> but this does: <svg xmlns="http://www.w3.org/2000/svg" width="92" height="45" viewBox="0 0 92 45">

no-overflow

Wrong (firefox):

broken-behaviour-firefox

Correct (chrome):

correct-behaviour-chrome
firesharker commented 1 year ago

Apparently the issue is present on any sap.m.OverflowToolbar, not specific to sap.tnt.ToolHeader.

boghyon commented 1 year ago

Adding data-sap-ui-xx-waitfortheme="init" to the bootstrap config helps, which indicates that there is a race condition probably.

LidiyaGeorgieva commented 1 year ago

Hello @firesharker ,

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

Regards, Lidiya

PetyaMarkovaBogdanova commented 1 year ago

Hi @firesharker , apologies for the big delay. The fix will be released in version 1.115.0 . Best regards, Petya Markova. (UI5 developer)