番外1 · 过年 - 暗火

番外1 · 过年 - 暗火

! el.hasAttribute('disabled'))

},

firstFocusable() { return this.focusables()[0] },

lastFocusable() { return this.focusables().slice(-1)[0] },

nextFocusable() { return this.focusables()[this.nextFocusableIndex()] || this.firstFocusable() },

prevFocusable() { return this.focusables()[this.prevFocusableIndex()] || this.lastFocusable() },

nextFocusableIndex() { return (this.focusables().indexOf(document.activeElement) + 1) % (this.focusables().length + 1) },

prevFocusableIndex() { return Math.max(0, this.focusables().indexOf(document.activeElement)) -1 },

}" x-init="$watch('show', value => {

if (value) {

document.body.classList.add('overflow-y-hidden');

} else {

document.body.classList.remove('overflow-y-hidden');

}

})" x-on:close.stop="show = false" x-on:keydown.escape.window="show = false" x-on:keydown.tab.prevent="$event.shiftKey || nextFocusable().focus()" x-on:keydown.shift.tab.prevent="prevFocusable().focus()" x-show="show" id="c21fbeed09802cb39903bf5e93364ec6" class="jetstream-modal fixed inset-0 overflow-y-auto px-4 py-6 sm:px-0 z-50" style="display: none;">

! el.hasAttribute('disabled'))

},

firstFocusable() { return this.focusables()[0] },

lastFocusable() { return this.focusables().slice(-1)[0] },

nextFocusable() { return this.focusables()[this.nextFocusableIndex()] || this.firstFocusable() },

prevFocusable() { return this.focusables()[this.prevFocusableIndex()] || this.lastFocusable() },

nextFocusableIndex() { return (this.focusables().indexOf(document.activeElement) + 1) % (this.focusables().length + 1) },

prevFocusableIndex() { return Math.max(0, this.focusables().indexOf(document.activeElement)) -1 },

}" x-init="$watch('show', value => {

if (value) {

document.body.classList.add('overflow-y-hidden');

} else {

document.body.classList.remove('overflow-y-hidden');

}

})" x-on:close.stop="show = false" x-on:keydown.escape.window="show = false" x-on:keydown.tab.prevent="$event.shiftKey || nextFocusable().focus()" x-on:keydown.shift.tab.prevent="prevFocusable().focus()" x-show="show" id="c81b1fb7efe07b3f0822f8b5014bc076" class="jetstream-modal fixed inset-0 overflow-y-auto px-4 py-6 sm:px-0 z-50" style="display: none;">

猜你喜欢

相关文章