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

ui5-combobox focus method not working #2895

Closed
ee92 opened this issue Mar 1, 2021 · 2 comments · Fixed by #3243
Closed

ui5-combobox focus method not working #2895

ee92 opened this issue Mar 1, 2021 · 2 comments · Fixed by #3243
Assignees
Labels
approved This issue is approved bug This issue is a bug in the code Medium Prio SAP SF TOPIC RL

Comments

@ee92
Copy link

ee92 commented Mar 1, 2021

Describe the bug
Using the .focus() method of the ui5-combobox does not work as expected. After calling .focus(), the ui5-combobox does not become the document.activeElement, does not have the focus outline, and has the .focused property set to false.

To reproduce
Steps to reproduce the behavior:

  1. Go to https://sap.github.io/ui5-webcomponents/playground/components/ComboBox/
  2. Using the dev tools, save a ui5-combobox as a variable
  3. Call .focus() on it and notice it does not get focused as expected.

Expected behavior
When .focus() is called on the ui5-combobox, it should become the document.activeElement, should have a focus outline, and should have the property .focused set to true.

Screenshots
Screen Shot 2021-03-01 at 9 25 18 AM

Context

  • UI5 Web Components version: 0.29.0

Affected components
ui5-combobox

Organization:
SuccessFactors

Priority: (optional)
Medium

Thank you for looking into it :)

@terezamch
Copy link
Contributor

Hello coleagues,

There is a missing data-sap-focus-ref attribute and therefore the component is not focused.

@ee92 , as for the outline - it is not rendered as the focus is in the console while executing the .focus() line.
It should work fine in the app logic.

Thanks,
Tereza

@terezamch terezamch added approved This issue is approved bug This issue is a bug in the code Medium Prio TOPIC RL labels Mar 2, 2021
@ilhan007 ilhan007 added the SAP SF label Mar 8, 2021
@ilhan007
Copy link
Member

ilhan007 commented Mar 8, 2021

FYI @SAP/ui5-webcomponents-topic-rl this issue has been assigned to you

@elenastoyanovaa elenastoyanovaa self-assigned this Mar 16, 2021
@niyap niyap assigned niyap and unassigned elenastoyanovaa and niyap Mar 23, 2021
@niyap niyap removed their assignment Apr 5, 2021
d3xter666 added a commit that referenced this issue May 13, 2021
@d3xter666 d3xter666 self-assigned this May 13, 2021
d3xter666 added a commit that referenced this issue May 21, 2021
@niyap niyap reopened this Jun 1, 2021
@d3xter666 d3xter666 reopened this Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This issue is approved bug This issue is a bug in the code Medium Prio SAP SF TOPIC RL
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

6 participants