MM-63411 Don't focus thread textbox automatically when it has a draft (#31250)
* MM-63411 Don't focus thread textbox automatically when it has a draft * Add E2E test * Add test files forgotten in previous commit --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a19eb5b9ef
Коммит
6517fa2fd1
@@ -523,7 +523,7 @@ const AdvancedTextEditor = ({
|
||||
// Update the caret position in the input box when changed by a side effect
|
||||
useEffect(() => {
|
||||
const textbox: HTMLInputElement | HTMLTextAreaElement | undefined = textboxRef.current?.getInputBox();
|
||||
if (textbox && textbox.selectionStart !== caretPosition) {
|
||||
if (textbox && textbox === document.activeElement && textbox.selectionStart !== caretPosition) {
|
||||
Utils.setCaretPosition(textbox, caretPosition);
|
||||
}
|
||||
}, [caretPosition]);
|
||||
|
||||
Ссылка в новой задаче
Block a user