mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #5577
This commit is contained in:
parent
3cd9b2d1e4
commit
760c98f998
2 changed files with 8 additions and 9 deletions
|
@ -85,7 +85,7 @@ export default {
|
|||
maximized: false,
|
||||
focusableMax: null,
|
||||
focusableClose: null,
|
||||
focusElementOnHide: null
|
||||
target: null
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
@ -140,7 +140,7 @@ export default {
|
|||
},
|
||||
onEnter() {
|
||||
this.$emit('show');
|
||||
this.focusElementOnHide = document.activeElement;
|
||||
this.target = document.activeElement;
|
||||
this.focus();
|
||||
this.enableDocumentSettings();
|
||||
this.bindGlobalListeners();
|
||||
|
@ -156,8 +156,8 @@ export default {
|
|||
},
|
||||
onLeave() {
|
||||
this.$emit('hide');
|
||||
DomHandler.focus(this.focusElementOnHide);
|
||||
this.focusElementOnHide = null;
|
||||
DomHandler.focus(this.target);
|
||||
this.target = null;
|
||||
this.focusableClose = null;
|
||||
this.focusableMax = null;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue