Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List: the SPACE key doesn't work inside the List header for Input fields #4049

Closed
Lukas742 opened this issue Oct 1, 2021 · 2 comments · Fixed by #4088
Closed

List: the SPACE key doesn't work inside the List header for Input fields #4049

Lukas742 opened this issue Oct 1, 2021 · 2 comments · Fixed by #4088
Assignees
Labels
bug This issue is a bug in the code TOPIC RL

Comments

@Lukas742
Copy link
Collaborator

Lukas742 commented Oct 1, 2021

Bug Description

When rendering an Input inside a List header slot, it's not possible to type in the SPACE key.

Expected Behavior

It should be possible to use SPACE to add an whitespace within an input field inside a list header.

Steps to Reproduce

  1. Go to codeSandbox
  2. Try to add a whitespace within the first input field. --> It's not working, as SPACE is not computed
  3. Try to add a whitespace within the second input field. --> It's working, because of the custom keydown event

Isolated Example

https://codesandbox.io/s/ui5-webcomponents-forked-xxtib?file=/src/index.js

Context

  • UI5 Web Components version: 1.0.0-rc.15

This issue is similar to #3517 and #3390

@plamenivanov91 plamenivanov91 added bug This issue is a bug in the code TOPIC RL labels Oct 4, 2021
@plamenivanov91
Copy link
Contributor

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

The issue is reproducible with the latest rc with the provided snippet.

Kind Regards,
Plamen

@niyap niyap self-assigned this Oct 4, 2021
@niyap
Copy link
Contributor

niyap commented Oct 4, 2021

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

The root cause of the reported issue is in the ui5-list component. On keydown, when the key is SPACE:
_onkeydown(event) {
if (isSpace(event)) {
event.preventDefault(); // prevent scroll
}

and that causes the issue.
We have had similar issue in the ui5-table. Here is a reference where you can check the solution used:
#3393

Could you please look over?

Thank you in advance!

Kind Regards,
Niya

@nnaydenow nnaydenow self-assigned this Oct 7, 2021
ilhan007 pushed a commit that referenced this issue Oct 8, 2021
Preventing the Space key on keydown is redundant since it should be already handled in its children separately.

Fixes: #4049
@petyabegovska petyabegovska moved this to Completed in Maintenance - Topic P Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug in the code TOPIC RL
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

4 participants