Merge pull request #1972 from w3cj/allow-tab-in-textarea

bug: fix allowTab logic
This commit is contained in:
Andras Bacsai 2024-04-12 21:43:05 +02:00 committed by GitHub
commit 1c349cf55c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,7 @@
e.preventDefault(); e.preventDefault();
e.target.setRangeText( e.target.setRangeText(
'\t', ' ',
e.target.selectionStart, e.target.selectionStart,
e.target.selectionStart, e.target.selectionStart,
'end' 'end'
@ -56,7 +56,7 @@
</div> </div>
@else @else
<textarea @keydown.tab="{{ $allowTab }} && handleKeydown" placeholder="{{ $placeholder }}" {{ $attributes->merge(['class' => $defaultClass]) }} <textarea {{ $allowTab ? '@keydown.tab=handleKeydown' : '' }} placeholder="{{ $placeholder }}" {{ $attributes->merge(['class' => $defaultClass]) }}
@if ($realtimeValidation) wire:model.debounce.200ms="{{ $id }}" @if ($realtimeValidation) wire:model.debounce.200ms="{{ $id }}"
@else @else
wire:model={{ $value ?? $id }} wire:model={{ $value ?? $id }}