Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
Scroll JobFormComponent into view on focus. Fixes #1048. [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-shatskyi committed May 26, 2017
1 parent f3e2e5e commit 37f2397
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/views/3_JobFormComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export class JobFormComponent extends React.Component<Props, State> {
}

focus(): void {
this.scrollIntoView();
this.commandNode.focus();
}

Expand Down Expand Up @@ -205,7 +206,7 @@ export class JobFormComponent extends React.Component<Props, State> {
}

scrollIntoView(): void {
this.commandNode.scrollIntoView(true);
this.placeholderNode.scrollIntoView(true);
}

private setText(text: string): void {
Expand Down

0 comments on commit 37f2397

Please sign in to comment.