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.5k stars 260 forks source link

ui5-input in the ui5-shellbar, pressing "tab" key causes a fatal exception #1314

Closed codefactor closed 4 years ago

codefactor commented 4 years ago

Describe the bug Using ui5-shellbar, click on the search button and then press "tab" key - this throws a fatal uncaught exception (which in react based pages in dev mode causes the page to disappear to show the error).

To reproduce Steps to reproduce the behavior:

  1. use 0.0.0-c6d8872f3 of ui5-webcomponents-fiori
  2. have a ui5-shellbar with a ui5-input slotted inside
  3. click the search button, focus is on the input, press "tab" key
  4. see the error in the logs

Isolated example https://codesandbox.io/s/ui5-webcomponents-cpw59 Couldn't get it to work

Expected behavior Pressing tab key should just move focus to the body of the page.

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

Context

Affected components (if known)

ui5-shellbar, ui5-input

Log output / Any errors in the console

Input.js:471 Uncaught TypeError: Cannot read property 'contains' of null
    at HTMLElement._onfocusout (Input.js:471)
    at EventPart.handleEvent (parts.ts:505)
    at HTMLDivElement.EventPart.__boundHandleEvent (parts.ts:463)
fifoosid commented 4 years ago

Hi @codefactor

This issue is already resolved in master branch with my latest PR

Best regards, Filip