mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 21:49:19 +02:00
Fix #1128: Lock focus in modals to improve accessibility
This commit is contained in:
parent
c5755e21a5
commit
0094cbb7d1
11 changed files with 40 additions and 13 deletions
|
@ -209,7 +209,7 @@ import $ from 'jquery'
|
|||
import moment from "moment"
|
||||
import lodash from '@/lodash'
|
||||
import time from "@/utils/time"
|
||||
|
||||
import createFocusTrap from 'focus-trap'
|
||||
import store from "@/store"
|
||||
|
||||
export default {
|
||||
|
@ -224,11 +224,14 @@ export default {
|
|||
showVolume: false,
|
||||
isShuffling: false,
|
||||
tracksChangeBuffer: null,
|
||||
focusTrap: null,
|
||||
time
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
let self = this
|
||||
this.focusTrap = createFocusTrap(this.$el, {allowOutsideClick: () => { return true }})
|
||||
this.focusTrap.activate()
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.scrollToCurrent()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue