Skip to content

Commit

Permalink
remove autoFocus prop
Browse files Browse the repository at this point in the history
  • Loading branch information
vanesa committed Jan 15, 2019
1 parent 73a1b5e commit 93eada0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion client/browser/src/libs/code_intelligence/extensions.tsx
Expand Up @@ -47,7 +47,6 @@ export function initializeExtensions({
extensionsController={extensionsController}
menu={ContributableMenu.CommandPalette}
platformContext={platformContext}
autoFocus={false}
location={history.location}
/>
<Notifications extensionsController={extensionsController} />
Expand Down
11 changes: 3 additions & 8 deletions shared/src/commandPalette/CommandList.tsx
Expand Up @@ -21,9 +21,6 @@ interface Props extends ExtensionsControllerProps, PlatformContextProps {
/** Called when the user has selected an item in the list. */
onSelect?: () => void

/** Whether the text input should have autofocus. */
autoFocus: boolean

location: H.Location
}

Expand Down Expand Up @@ -89,11 +86,9 @@ export class CommandList extends React.PureComponent<Props, State> {
)

// Only focus input after it has been rendered in the DOM
if (this.props.autoFocus) {
setTimeout(() => {
this.setState({ autoFocus: true })
})
}
setTimeout(() => {
this.setState({ autoFocus: true })
})
}

public componentDidUpdate(_prevProps: Props, prevState: State): void {
Expand Down
1 change: 0 additions & 1 deletion web/src/nav/NavLinks.tsx
Expand Up @@ -97,7 +97,6 @@ export class NavLinks extends React.PureComponent<Props> {
extensionsController={this.props.extensionsController}
platformContext={this.props.platformContext}
toggleVisibilityKeybinding={this.props.keybindings.commandPalette}
autoFocus={true}
location={this.props.location}
/>
{this.props.authenticatedUser && (
Expand Down

0 comments on commit 93eada0

Please sign in to comment.