Skip to content

Commit b383599

Browse files
authored
Merge pull request #728 from Thoth2023/develop
Develop
2 parents 1f0ca0c + 8139924 commit b383599

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

app/Livewire/Conducting/StudySelection/PaperModal.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,6 @@ public function nextPaper()
328328
->first();
329329

330330
if ($nextPaper) {
331-
// Fecha o modal atual
332-
$this->dispatch('close-paper');
333-
334331
// Mostra o próximo
335332
$this->showPaper($nextPaper, $this->criterias);
336333
} else {
@@ -347,7 +344,6 @@ public function previousPaper()
347344
->first();
348345

349346
if ($previousPaper) {
350-
$this->dispatch('close-paper');
351347
$this->showPaper($previousPaper, $this->criterias);
352348
} else {
353349
session()->flash('errorMessage', 'This is the first paper.');

resources/views/livewire/conducting/study-selection/paper-modal.blade.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div>
2-
<div wire:ignore.self class="modal fade" id="paperModal" tabindex="-1" role="dialog" aria-labelledby="paperModalLabel"
2+
<div wire:ignore.self class="modal fade" id="paperModal" tabindex="-1" role="dialog" aria-labelledby="paperModalLabel" wire:key="paperModal"
33
aria-hidden="true">
44
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
55
<div class="modal-content">
@@ -169,6 +169,11 @@
169169

170170
@script
171171
<script>
172+
// --- Corrige o warning de aria-hidden / focus retido em modais ---
173+
document.addEventListener('hidden.bs.modal', function (event) {
174+
document.activeElement?.blur();
175+
});
176+
172177
document.addEventListener('livewire:initialized', () => {
173178
174179
// --- Abrir modal principal ---
@@ -219,3 +224,4 @@
219224
220225
221226
227+

0 commit comments

Comments
 (0)