File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
packages/code-editor/src/SearchPanel Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,10 @@ import {
17
17
setSearchQuery ,
18
18
} from '@codemirror/search' ;
19
19
20
- import Button from '@leafygreen-ui/button' ;
21
- import IconButton from '@leafygreen-ui/icon-button' ;
20
+ import { Button } from '@leafygreen-ui/button' ;
21
+ import { IconButton } from '@leafygreen-ui/icon-button' ;
22
22
import { useDarkMode } from '@leafygreen-ui/leafygreen-provider' ;
23
- import TextInput from '@leafygreen-ui/text-input' ;
23
+ import { TextInput } from '@leafygreen-ui/text-input' ;
24
24
import { Body , useUpdatedBaseFontSize } from '@leafygreen-ui/typography' ;
25
25
26
26
import { Icon } from '../../../icon/src/Icon' ;
@@ -232,11 +232,13 @@ export function SearchPanel({
232
232
onChange = { handleSearchQueryChange }
233
233
onKeyDown = { handleFindInputKeyDown }
234
234
className = { findInputStyles }
235
- // eslint-disable-next-line jsx-a11y/no-autofocus
236
- autoFocus
237
235
value = { searchString }
238
236
baseFontSize = { baseFontSizeProp || baseFontSize }
239
237
darkMode = { darkMode }
238
+ // eslint-disable-next-line jsx-a11y/no-autofocus
239
+ autoFocus
240
+ // CodeMirror looks for this attribute to refocus when CMD+F is pressed and the panel is already open
241
+ main-field = "true"
240
242
/>
241
243
< div className = { findOptionsContainerStyles } >
242
244
{ searchString && (
You can’t perform that action at this time.
0 commit comments