File tree Expand file tree Collapse file tree 2 files changed +6
-13
lines changed
src/packages/Controls/SearchEngine Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ class SearchEngineAdvanced extends Control {
187187 // Focus sur le bouton de recherche avancée
188188 this . advancedBtn . focus ( ) ;
189189 } else {
190- this . baseSearchEngine . subimtBt . focus ( ) ;
190+ this . eraseBtn . focus ( ) ;
191191 }
192192 }
193193 } . bind ( this ) ) ;
@@ -337,6 +337,8 @@ class SearchEngineAdvanced extends Control {
337337 eraseBtn . addEventListener ( "click" , function ( ) {
338338 this . baseSearchEngine . input . value = "" ;
339339 delete this . baseSearchEngine . input . dataset . empty ;
340+ // Notifie l'input du changement
341+ this . baseSearchEngine . input . dispatchEvent ( new Event ( "input" ) ) ;
340342 } . bind ( this ) ) ;
341343 this . baseSearchEngine . optionscontainer . appendChild ( eraseBtn ) ;
342344 }
Original file line number Diff line number Diff line change @@ -179,18 +179,9 @@ class SearchEngineBase extends Control {
179179 // Réaffiche la valeur précédente de l'utilisateur
180180 e . target . value = this . _previousValue ;
181181 }
182- break ;
183- case "Enter" :
184- // Lance la recherche
185- let item = list [ idx ] ;
186- if ( idx < 0 ) {
187- // Pas d'item sélectionné : on prend le premier de la liste
188- item = list [ 0 ] ;
189- }
190- if ( item ) {
191- // Simule un clic sur l'élément sélectionné
192- item . click ( ) ;
193- }
182+ // Envoie un événement de type input pour notifier le changement
183+ this . input . dispatchEvent ( new Event ( "input" ) ) ;
184+
194185 break ;
195186 default :
196187 if ( e . target . value . length && e . target . value . length >= options . minChars && e . target . value !== this . _currentValue ) {
You can’t perform that action at this time.
0 commit comments