We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a1967b commit eb0ff84Copy full SHA for eb0ff84
resources/views/components/modal.blade.php
@@ -41,6 +41,13 @@
41
nextFocusableIndex() { return (this.focusables().indexOf(document.activeElement) + 1) % (this.focusables().length + 1) },
42
prevFocusableIndex() { return Math.max(0, this.focusables().indexOf(document.activeElement)) -1 },
43
}"
44
+ x-init="$watch('show', value => {
45
+ if (value) {
46
+ document.body.classList.add('overflow-y-hidden');
47
+ } else {
48
+ document.body.classList.remove('overflow-y-hidden');
49
+ }
50
+ })"
51
x-on:close.stop="show = false"
52
x-on:keydown.escape.window="show = false"
53
x-on:keydown.tab.prevent="$event.shiftKey || nextFocusable().focus()"
0 commit comments