From ad38fc32d7ac2081efcdef24749471fbe96286dd Mon Sep 17 00:00:00 2001 From: Erin Dalzell Date: Tue, 23 Jul 2024 20:51:13 -0700 Subject: [PATCH] Fix esc closing Right now if you use `esc` to close the drop down, the event bubbles up and may trigger other esc key handlers, like in a modal. --- resources/views/components/autocomplete/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/components/autocomplete/index.blade.php b/resources/views/components/autocomplete/index.blade.php index 7e543b1..f128eaa 100644 --- a/resources/views/components/autocomplete/index.blade.php +++ b/resources/views/components/autocomplete/index.blade.php @@ -13,7 +13,7 @@ fireEvents: @js(!$disableEvents), })" x-on:{{ $name }}-clear.window="fireEvents && clear()" - x-on:keydown.escape="escape($event)" + x-on:keydown.escape.stop="escape($event)" x-on:click.outside="outside()" {{ $attributes->whereDoesntStartWith('wire:model')->class(['' => !$unstyled, 'relative']) }}> {{ $slot }}