Merge pull request #3943 from primefaces/issue-3940

Sidebar - Dialog: Focus issue
pull/4276/head
Tuğçe Küçükoğlu 2023-08-16 10:11:12 +03:00 committed by GitHub
commit 0f3048776c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -163,7 +163,7 @@ export default {
},
focus() {
const findFocusableElement = (container) => {
return container.querySelector('[autofocus]');
return container && container.querySelector('[autofocus]');
};
let focusTarget = this.$slots.footer && findFocusableElement(this.footerContainer);

View File

@ -100,7 +100,7 @@ export default {
},
focus() {
const findFocusableElement = (container) => {
return container.querySelector('[autofocus]');
return container && container.querySelector('[autofocus]');
};
let focusTarget = this.$slots.default && findFocusableElement(this.content);