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"
|
id="autosize_textarea"
|
||||||
role="textbox"
|
role="textbox"
|
||||||
rows={1}
|
rows={1}
|
||||||
|
style={
|
||||||
|
Object {
|
||||||
|
"overflowY": "auto",
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
style={
|
style={
|
||||||
@@ -44,7 +49,10 @@ exports[`components/AutosizeTextarea should match snapshot, init 1`] = `
|
|||||||
Object {
|
Object {
|
||||||
"display": "inline-block",
|
"display": "inline-block",
|
||||||
"height": "auto",
|
"height": "auto",
|
||||||
|
"position": "relative",
|
||||||
|
"transform": "translateY(-100%)",
|
||||||
"width": "auto",
|
"width": "auto",
|
||||||
|
"wordBreak": "break-word",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -25,9 +25,12 @@ const styles = {
|
|||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
},
|
},
|
||||||
reference: {
|
reference: {
|
||||||
display: 'inline-block',
|
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
width: 'auto',
|
width: 'auto',
|
||||||
|
display: 'inline-block',
|
||||||
|
position: 'relative' as const,
|
||||||
|
transform: 'translateY(-100%)',
|
||||||
|
wordBreak: 'break-word' as const,
|
||||||
},
|
},
|
||||||
placeholder: {
|
placeholder: {
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
@@ -39,6 +42,9 @@ const styles = {
|
|||||||
background: 'none',
|
background: 'none',
|
||||||
borderColor: 'transparent',
|
borderColor: 'transparent',
|
||||||
},
|
},
|
||||||
|
textArea: {
|
||||||
|
overflowY: 'auto' as const,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const AutosizeTextarea = React.forwardRef<HTMLTextAreaElement, Props>(({
|
const AutosizeTextarea = React.forwardRef<HTMLTextAreaElement, Props>(({
|
||||||
@@ -168,6 +174,7 @@ const AutosizeTextarea = React.forwardRef<HTMLTextAreaElement, Props>(({
|
|||||||
onInput={onInput}
|
onInput={onInput}
|
||||||
value={value}
|
value={value}
|
||||||
defaultValue={defaultValue}
|
defaultValue={defaultValue}
|
||||||
|
style={styles.textArea}
|
||||||
/>
|
/>
|
||||||
<div style={styles.container}>
|
<div style={styles.container}>
|
||||||
<div
|
<div
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user