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

[BUG] People picker: selectUsersById causes user dropdown to open up #3184

Open
web265p3 opened this issue May 15, 2024 · 2 comments
Open

[BUG] People picker: selectUsersById causes user dropdown to open up #3184

web265p3 opened this issue May 15, 2024 · 2 comments
Labels
bug Something isn't working Needs: Triage 🔍

Comments

@web265p3
Copy link

web265p3 commented May 15, 2024

Describe the bug
Whenever I use the function selectUserById of the people picker component, the dropdown to pick a user opens up.

To Reproduce
Steps to reproduce the behavior:

  1. Create the people picker component. ie:

<mgt-people-picker ngDefaultControl name="people" id="MY_TEST_ID"> </mgt-people-picker>
2. Call the selectUserById function:

(document.getElementById('MY_TEST_ID') as any).selectUsersById(['977c3cbe-e47e-xxxx-b92c-0739ad67ebbe']);
3. The dropdown of the people picker opens, because the focus is caught.

Expected behavior
The focus of the element should not be caught automatically just because selectUsersById is called. Usually a programmatical selection does not need additional user action.

Environment

  • Browser Edge latest version
  • Framework Angular as custom element

Additional context
I am using Angular and use the people picker as a custom element.

@web265p3 web265p3 added bug Something isn't working Needs: Triage 🔍 labels May 15, 2024
@web265p3
Copy link
Author

Just figured out that this does not happen in older versions. For example in 2.6.2 everything works fine. So this is a bug of the current version 4.2.1

@musale
Copy link
Contributor

musale commented May 24, 2024

I can't quit figure out how you're using this control @web265p3. Please could you explain a little more how you're utilizing it as a custom element?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Needs: Triage 🔍
Projects
Status: Needs Triage 🔍
Development

No branches or pull requests

2 participants