File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
packages/gitbook/src/components Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,13 @@ export function AIChatInput(props: {
34
34
35
35
useEffect ( ( ) => {
36
36
if ( ! disabled && ! loading ) {
37
- inputRef . current ?. focus ( ) ;
37
+ // Add a small delay to ensure the input is rendered before focusing
38
+ // This fixes inconsistent focus behaviour across browsers
39
+ const timeout = setTimeout ( ( ) => {
40
+ inputRef . current ?. focus ( ) ;
41
+ } , 50 ) ;
42
+
43
+ return ( ) => clearTimeout ( timeout ) ;
38
44
}
39
45
} , [ disabled , loading ] ) ;
40
46
@@ -120,8 +126,8 @@ export function AIChatInput(props: {
120
126
arrow
121
127
>
122
128
< div className = "flex cursor-help items-center gap-1 circular-corners:rounded-2xl rounded-corners:rounded-md px-2 py-1 text-tint/7 text-xs transition-all hover:bg-tint" >
123
- < span className = "-ml-1 circular -corners:rounded-2xl rounded -corners:rounded-md bg-tint-11/7 px-1 py-0.5 font-mono font-semibold text-[0.65rem] text-contrast-tint-11 leading-none" >
124
- AI
129
+ < span className = "-ml-1 rounded -corners:rounded circular -corners:rounded-2xl bg-tint-11/7 px-1 py-0.5 font-mono font-semibold text-[0.65rem] text-contrast-tint-11 leading-none" >
130
+ { t ( language , 'ai_chat_context_badge' ) }
125
131
</ span > { ' ' }
126
132
< span > { t ( language , 'ai_chat_context_title' ) } </ span >
127
133
</ div >
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ export const variantClasses = {
36
36
'bg-transparent' ,
37
37
'text-tint' ,
38
38
'border-0' ,
39
- 'shadow-none' ,
39
+ '! shadow-none' ,
40
40
'hover:bg-primary-hover' ,
41
41
'hover:text-primary-strong' ,
42
42
'hover:scale-1' ,
You can’t perform that action at this time.
0 commit comments