mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-08 16:37:15 +00:00
Fixed #4500 - Theme updates: change :focus to focus-visible
This commit is contained in:
parent
045820d0fa
commit
f40b8fb178
51 changed files with 1672 additions and 1669 deletions
|
@ -62,7 +62,8 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
name: this.$attrs.name,
|
||||
focusedOptionIndex: -1
|
||||
focusedOptionIndex: -1,
|
||||
isFocusVisibleItem: true
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
@ -85,6 +86,7 @@ export default {
|
|||
onOptionClick(event, value) {
|
||||
if (!this.readonly && !this.disabled) {
|
||||
this.onOptionSelect(event, value);
|
||||
this.isFocusVisibleItem = false;
|
||||
const firstFocusableEl = DomHandler.getFirstFocusableElement(event.currentTarget);
|
||||
|
||||
firstFocusableEl && DomHandler.focus(firstFocusableEl);
|
||||
|
@ -100,6 +102,7 @@ export default {
|
|||
},
|
||||
onChange(event, value) {
|
||||
this.onOptionSelect(event, value);
|
||||
this.isFocusVisibleItem = true;
|
||||
},
|
||||
onOptionSelect(event, value) {
|
||||
this.focusedOptionIndex = value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue