Skip to content

Commit

Permalink
Fix entering space on FireFox
Browse files Browse the repository at this point in the history
  • Loading branch information
Skalakid committed Sep 11, 2024
1 parent 5f6bdaa commit 95e428c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/MarkdownTextInput.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,11 @@ const MarkdownTextInput = React.forwardRef<TextInput, MarkdownTextInputProps>(
flattenedStyle && {
caretColor: (flattenedStyle as TextStyle).color || 'black',
},
multiline && {whitespace: 'pre-wrap'},
disabled && styles.disabledInputStyles,
parseToReactDOMStyle(flattenedStyle),
]) as CSSProperties,
[flattenedStyle, disabled],
[flattenedStyle, multiline, disabled],
);

const undo = useCallback(
Expand Down
4 changes: 4 additions & 0 deletions src/web/MarkdownTextInput.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
overflow: auto;
}

.react-native-live-markdown-input-multiline {
white-space: pre-wrap;
}

.react-native-live-markdown-input-singleline p {
display: inline-block;
}
Expand Down

0 comments on commit 95e428c

Please sign in to comment.