Focus handling & keyboard handling in wrapper controls
Issue: The problem is that when you have input in a table and press Space while the input is focussed, the page is scrolled. The same behaviour can be observed inside custom-list-item.
If the event is prevented inside table/custom-list-item, you are not able to enter a space in the input, which is a problem as well.
We need a common solution for use cases like this, where anything can be passed as content from the user(input, ui5-input, textarea, ui5-textarea...)
One more Example:
ui5-input inside ui5-list and or ui5-custom-list-item:
with rc.14:
https://codesandbox.io/s/input-in-customlistitem-ph9ig?file=/src/App.js
Space is not accepted inside the CustomListItem, but works e.g. as direct child of the List.
with rc.15: https://codesandbox.io/s/input-in-customlistitem-forked-g95mf not working in both cases
This issue has been closed. To reopen, just leave a comment!
commenting...
Closing the issue because components like lists, tables, etc. should only handle events when they come from their own focused DOM element and the component is currently focused. If the focus is on a child element inside the component (using the focus-within approach), then that child element is treated as the interactive part and should handle the actions. Other use cases, like the ones shown in the CodeSandbox example, should be seen as bugs and need to be reviewed separately.
This issue has been closed. To reopen, just leave a comment!