-
Notifications
You must be signed in to change notification settings - Fork 270
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
Dialog: initial focus not applied on open #2537
Comments
FYI @SAP/ui5-webcomponents-topic-rd |
Now the initial focus is applied also in cases when the dialog is opened before it is fully rendered. Fixes: SAP#2537
Now the initial focus is applied also in cases when the dialog is opened before it is fully rendered. Fixes: SAP#2537
Now the initial focus is applied also in cases when the dialog is open before it is fully rendered. Fixes: #2537
Now the initial focus is applied also in cases when the dialog is open before it is fully rendered. Fixes: SAP#2537
Hello @alexandar-mitsev After upgrading the test system with version that includes the fix, the MDK colleagues found out that the issue is still present - the focus does not apply as expected. The steps to reproduce are the same. BR, |
Awaiting system to be updated to last release of ui5-webcomponents to check if #2679 fixes with the problem. |
Hi @ilhan007, the system running on the latest version of ui5-webcomponents no longer observes the reported bug. |
Describe the bug
The focus does not go to the focusable element in the dialog when it opens.
Note: The bug is not reproducible in our examples.
To reproduce
Steps to reproduce the behavior:
Comment
The "applyFocus" method is called before the Shadow DOM of the Dialog is ready, as consequence no focusable
element is found. We have to ensure that the Dialog is really open, the DOM is ready, and then call "applyFocus".
I also asked the app developer (from where the issue origins) to check if calling "applyFocus" "onAfterRendering" would fix the issue.
As you can see the time the applyFocus is called, the footer is not displayed, seems it is about to be slotted by the browser.
Using setTimeout resolves the issue.
Video
Screen Recording 2020-11-25 at 3.15.40 PM.mov.zip
Expected behavior
The button in the Dialog's footer should be the element on focus after the Dialog opens
Context
Affected components (if known) ui5-dialog (Popup)
The text was updated successfully, but these errors were encountered: