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

List: `focusin` event doesn't bubble #9787

Open Lukas742 opened 1 week ago

Lukas742 commented 1 week ago

Bug Description

This is a followup issue to this issue: https://github.com/SAP/ui5-webcomponents-react/issues/6294

The focusin event of the List component doesn't bubble which prevents the synthetic onFocus event of React to work correctly (internally it implements focusin for the native event). React example.

Also, it is not possible registering the focusin event of the ui5-list element itself, for example to identify which ui5-li is focused. Of course, one could register a focusin event for each ui5-li, but it would be much easier to just add it to the parent component. The standard is, that focusin events bubble, if that's no possible for this implementation, I think it would be worth mentioning that in the docs.

I've edited the example of the linked issue to show this behavior: plain ui5wc example

Affected Component

No response

Expected Behaviour

The focusin event should bubble.

Isolated Example

https://stackblitz.com/edit/github-pwfft8?file=index.html,main.js

Steps to Reproduce

  1. See StackBlitz example
  2. Navigate through list via keyboard keys (Tab for enter, arrow keys for list items)
  3. Navigate through buttons via keyboard keys (Tab)
  4. See the difference

Log Output, Stack Trace or Screenshots

No response

Priority

None

UI5 Web Components Version

2.1.2

Browser

Chrome, Edge, Firefox, Safari

Operating System

No response

Additional Context

No response

Organization

UI5WCR

Declaration

kskondov commented 1 week ago

Hello @ui5-webcomponents-topic-p,

Can you please take a look at the reported issue and check the possibilities to bubble the focusin event or document that it does not as proposed by @Lukas742

Best Regards, Konstantin