Auto-focus on card title only if its empty

This commit is contained in:
Chen-I Lim 2020-11-20 11:54:40 -08:00
parent 0d2311fdc5
commit 2b186e2362

View file

@ -44,7 +44,9 @@ class CardDetail extends React.Component<Props, State> {
}
componentDidMount(): void {
this.titleRef.current?.focus()
if (!this.state.title) {
this.titleRef.current?.focus()
}
}
constructor(props: Props) {