fix: delay title focus (#2795)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
parent
a2e7deba84
commit
62b2abc3d2
2 changed files with 1 additions and 4 deletions
|
@ -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})
|
||||
}, [])
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue