MM-54561 Enable scrolling and visible scrollbar in post textbox (#27369)
* fix: Enable scrolling and visible scrollbar in post textbox * fix: Enable scrolling and visible scrollbar in post textbox * fix: removed "display inline-block" styling to enable autosizing while typing * fix: update reference css properties * update test snapshot * fixed lint in file * fix: modify type casting * fix: removed unused import --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -26,6 +26,11 @@ exports[`components/AutosizeTextarea should match snapshot, init 1`] = `
|
||||
id="autosize_textarea"
|
||||
role="textbox"
|
||||
rows={1}
|
||||
style={
|
||||
Object {
|
||||
"overflowY": "auto",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<div
|
||||
style={
|
||||
@@ -44,7 +49,10 @@ exports[`components/AutosizeTextarea should match snapshot, init 1`] = `
|
||||
Object {
|
||||
"display": "inline-block",
|
||||
"height": "auto",
|
||||
"position": "relative",
|
||||
"transform": "translateY(-100%)",
|
||||
"width": "auto",
|
||||
"wordBreak": "break-word",
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -25,9 +25,12 @@ const styles = {
|
||||
overflow: 'hidden',
|
||||
},
|
||||
reference: {
|
||||
display: 'inline-block',
|
||||
height: 'auto',
|
||||
width: 'auto',
|
||||
display: 'inline-block',
|
||||
position: 'relative' as const,
|
||||
transform: 'translateY(-100%)',
|
||||
wordBreak: 'break-word' as const,
|
||||
},
|
||||
placeholder: {
|
||||
overflow: 'hidden',
|
||||
@@ -39,6 +42,9 @@ const styles = {
|
||||
background: 'none',
|
||||
borderColor: 'transparent',
|
||||
},
|
||||
textArea: {
|
||||
overflowY: 'auto' as const,
|
||||
},
|
||||
};
|
||||
|
||||
const AutosizeTextarea = React.forwardRef<HTMLTextAreaElement, Props>(({
|
||||
@@ -168,6 +174,7 @@ const AutosizeTextarea = React.forwardRef<HTMLTextAreaElement, Props>(({
|
||||
onInput={onInput}
|
||||
value={value}
|
||||
defaultValue={defaultValue}
|
||||
style={styles.textArea}
|
||||
/>
|
||||
<div style={styles.container}>
|
||||
<div
|
||||
|
||||
Ссылка в новой задаче
Block a user