textfields: make them consistent (#2984)

as i look into textfields the places where we are using them are
out-of-sync at the moment. this brings them in line with each other for
further refactoring later.

### Change Type

- [x] `patch` — Bug fix
This commit is contained in:
Mime Čuvalo 2024-02-29 12:15:57 +00:00 committed by GitHub
parent 4f07e696e8
commit 83423cd6d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View file

@ -76,6 +76,7 @@ export const ArrowTextLabel = React.memo(function ArrowTextLabel({
onChange={handleChange}
onKeyDown={handleKeyDown}
onBlur={handleBlur}
onTouchEnd={stopEventPropagation}
onContextMenu={stopEventPropagation}
onPointerDown={handleInputPointerDown}
onDoubleClick={handleDoubleClick}

View file

@ -120,6 +120,7 @@ export const TextLabel = React.memo(function TextLabel<
onChange={handleChange}
onKeyDown={handleKeyDown}
onBlur={handleBlur}
onTouchEnd={stopEventPropagation}
onContextMenu={stopEventPropagation}
onPointerDown={handleInputPointerDown}
onDoubleClick={handleDoubleClick}

View file

@ -118,11 +118,11 @@ export class TextShapeUtil extends ShapeUtil<TLTextShape> {
autoCapitalize="false"
autoCorrect="false"
autoSave="false"
autoFocus={isEditing}
autoFocus
placeholder=""
spellCheck="true"
wrap="off"
dir="ltr"
dir="auto"
datatype="wysiwyg"
defaultValue={text}
onFocus={handleFocus}