fix: delay title focus (#2795)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
KyeongSoo Kim 2022-04-16 06:11:25 +09:00 committed by GitHub
parent a2e7deba84
commit 62b2abc3d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View file

@ -65,7 +65,7 @@ const CardDetail = (props: Props): JSX.Element|null => {
useEffect(() => {
if (!title) {
titleRef.current?.focus()
setTimeout(() => titleRef.current?.focus(), 300)
}
TelemetryClient.trackEvent(TelemetryCategory, TelemetryActions.ViewCard, {board: props.board.id, view: props.activeView.id, card: card.id})
}, [])

View file

@ -126,9 +126,6 @@ const MarkdownEditorInput = (props: Props): ReactElement => {
const onEditorStateChange = useCallback((newEditorState: EditorState) => {
const newText = newEditorState.getCurrentContent().getPlainText()
const text = editorState.getCurrentContent().getPlainText()
if(text === newText) return
onChange && onChange(newText)
setEditorState(newEditorState)