ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

Popup open method unstable

Open MarcusNotheis opened this issue 7 years ago • 1 comments

Describe the bug A clear and concise description of what the bug is.

I think that the open method of the Popup Web Component is potentially unstable. At some point, there is a method createBLyBackStyle called and this method is accessing the first stylesheet of the document. In case this is an external stylesheet injected by "classical" SAPUI5, e.g. "https://sapui5.hana.ondemand.com/1.56.16/resources/sap/ui/core/themes/sap_belize/library.css" this method is crashing the the following error: Uncaught DOMException: Failed to execute 'insertRule' on 'CSSStyleSheet': Cannot access StyleSheet to insertRule

https://github.com/SAP/ui5-webcomponents/blob/master/packages/main/src/Popup.js#L151

To reproduce Steps to reproduce the behavior:

  1. Take a "classical" UI5 app as basis
  2. Add a popover web component
  3. Open the popup

Isolated example Please provide an isolated example if possibile, by forking CodeSandbox As soon as I find the time I'll create an example.

Expected behavior A clear and concise description of what you expected to happen. The popup should open and not crash with an DOMException

Screenshots If applicable, add screenshots to help explain your problem. image

Context

  • UI5 Web Components version: v0.13.1
  • OS/Platform: macOS
  • Browser (if relevant): Chrome 75.0.3770.100

Affected components (if known)

  • Popup
  • Dialog

MarcusNotheis avatar Jun 25 '19 13:06 MarcusNotheis

Closing the issue, as it was fixed.

fifoosid avatar Jun 28 '19 08:06 fifoosid