SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.51k stars 260 forks source link

DatePicker prints "Empty string passed to getElementById" warning #7711

Closed raquo closed 10 months ago

raquo commented 11 months ago

Bug Description

In Firefox (v118), DatePicker prints "Empty string passed to getElementById" warning twice in the console when I click to open it.

Affected Component

DatePicker

Expected Behaviour

Datepicker should not print any warnings to the console in regular usage.

Isolated Example

https://codesandbox.io/s/ui5-webcomponents-forked-jh4drz?file=/index.html

Steps to Reproduce

  1. Use DatePicker like this: <ui5-date-picker value="2023-01-31"></ui5-date-picker> (+ the necessary JS imports)
  2. In Firefox, click on the calendar icon to open the date picker popup
  3. Two "Empty string passed to getElementById" warnings appear in the browser console, attributed to lines 425 and 426 in Popup.ts

Other browsers (Chrome, Safari) don't print these warnings.

If codesandbox does not work for you in Firefox, you can also reproduce this behaviour on this page for example (again, only in Firefox): https://sap.github.io/ui5-webcomponents/playground/?path=/docs/main-datepicker--docs

Log Output, Stack Trace or Screenshots

Screen Shot 2023-10-18 at 03 52 47

Priority

None

UI5 Web Components Version

1.18.0

Browser

Firefox

Operating System

MacOS

Additional Context

Organization

No response

Declaration

yanaminkova commented 11 months ago

Hello @SAP/ui5-webcomponents-topic-b,

In the following codesandbox example, each time you click on the calendar icon, two "Empty string passed to getElementById" warnings appear in the browser console. This behaviour is reproducible only in FireFox browser.

Could you please have a look at it?

Kind regards, Yana

unazko commented 11 months ago

Hello @SAP/ui5-webcomponents-topic-rd,

Those warnings appear in the popover basic storybook sample as well: https://sap.github.io/ui5-webcomponents/playground/?path=/docs/main-popover--docs

There are related to the focus initial focus placement although there is no focusing issue in the samples. Could you please provide your feedback.

Best regards, Boyan