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
pull/2997/head
Mime Čuvalo 2024-02-29 12:15:57 +00:00 zatwierdzone przez GitHub
rodzic 4f07e696e8
commit 83423cd6d7
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
3 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -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}

Wyświetl plik

@ -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}

Wyświetl plik

@ -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}