File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,13 @@ export default function Sort() {
76
76
return SortTypes . BestMatch ;
77
77
}
78
78
} ;
79
+
80
+ const handleClick = ( ) => {
81
+ const elem = document . activeElement as HTMLElement ;
82
+ if ( elem ) {
83
+ elem ?. blur ( ) ;
84
+ }
85
+ } ;
79
86
return (
80
87
< div className = "flex justify-center items-center mb-8 flex-col gap-2" >
81
88
< div className = "dropdown dropdown-hover" >
@@ -89,7 +96,7 @@ export default function Sort() {
89
96
< div className = "h-64 p-2 overflow-y-scroll shadow dropdown-content z-50 bg-base-100 rounded-box w-60" >
90
97
< ul tabIndex = { 0 } className = "menu menu-vertical" >
91
98
{ mainLanguages . sort ( sortByName ) . map ( language => (
92
- < li key = { language } >
99
+ < li key = { language } onClick = { handleClick } >
93
100
< Link href = { `/repos/${ language . toLowerCase ( ) } ` } >
94
101
{ language }
95
102
</ Link >
@@ -109,7 +116,7 @@ export default function Sort() {
109
116
< div className = "h-64 p-2 z-50 overflow-y-scroll shadow dropdown-content bg-base-100 rounded-box w-60" >
110
117
< ul tabIndex = { 0 } className = "menu menu-vertical" >
111
118
{ navigationItems . map ( ( item , index ) => (
112
- < li key = { index } >
119
+ < li key = { index } onClick = { handleClick } >
113
120
< Link href = { { query : item . href . query } } >
114
121
{ item . name }
115
122
</ Link >
You can’t perform that action at this time.
0 commit comments