diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index 9e1d353..fa43a4d 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -17,7 +17,7 @@
"lucide-react": "^0.483.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
- "react-router-dom": "^7.2.0",
+ "react-router-dom": "^7.5.2",
"throttle-debounce": "^5.0.2"
},
"devDependencies": {
@@ -1507,12 +1507,6 @@
"vite": "^5.2.0 || ^6"
}
},
- "node_modules/@types/cookie": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz",
- "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==",
- "license": "MIT"
- },
"node_modules/@types/estree": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz",
@@ -3970,12 +3964,11 @@
}
},
"node_modules/react-router": {
- "version": "7.4.0",
- "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.4.0.tgz",
- "integrity": "sha512-Y2g5ObjkvX3VFeVt+0CIPuYd9PpgqCslG7ASSIdN73LwA1nNWzcMLaoMRJfP3prZFI92svxFwbn7XkLJ+UPQ6A==",
+ "version": "7.5.2",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.5.2.tgz",
+ "integrity": "sha512-9Rw8r199klMnlGZ8VAsV/I8WrIF6IyJ90JQUdboupx1cdkgYqwnrYjH+I/nY/7cA1X5zia4mDJqH36npP7sxGQ==",
"license": "MIT",
"dependencies": {
- "@types/cookie": "^0.6.0",
"cookie": "^1.0.1",
"set-cookie-parser": "^2.6.0",
"turbo-stream": "2.4.0"
@@ -3994,12 +3987,12 @@
}
},
"node_modules/react-router-dom": {
- "version": "7.4.0",
- "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.4.0.tgz",
- "integrity": "sha512-VlksBPf3n2bijPvnA7nkTsXxMAKOj+bWp4R9c3i+bnwlSOFAGOkJkKhzy/OsRkWaBMICqcAl1JDzh9ZSOze9CA==",
+ "version": "7.5.2",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.5.2.tgz",
+ "integrity": "sha512-yk1XW8Fj7gK7flpYBXF3yzd2NbX6P7Kxjvs2b5nu1M04rb5pg/Zc4fGdBNTeT4eDYL2bvzWNyKaIMJX/RKHTTg==",
"license": "MIT",
"dependencies": {
- "react-router": "7.4.0"
+ "react-router": "7.5.2"
},
"engines": {
"node": ">=20.0.0"
diff --git a/frontend/package.json b/frontend/package.json
index 4bb506d..4ade16f 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -22,7 +22,7 @@
"lucide-react": "^0.483.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
- "react-router-dom": "^7.2.0",
+ "react-router-dom": "^7.5.2",
"throttle-debounce": "^5.0.2"
},
"devDependencies": {
diff --git a/frontend/src/pages/Report/components/Bug/Bug.tsx b/frontend/src/pages/Report/components/Bug/Bug.tsx
index bb94f72..a544b40 100644
--- a/frontend/src/pages/Report/components/Bug/Bug.tsx
+++ b/frontend/src/pages/Report/components/Bug/Bug.tsx
@@ -73,35 +73,23 @@ const Bug = ({ reportId, isNewReport, bugId }: BugProps) => {
});
useEffect(() => {
- const root = document.documentElement;
- const rawCssVar = getComputedStyle(root).getPropertyValue("--spacing");
- const spacing = parseFloat(rawCssVar);
- // вычисляем значение паддинга у
- // 3 -- потому что className p-3 у
- const calculatedTextareaPaddingEm = spacing * 3;
-
- if (receivedTextareaRef.current && expectedTextareaRef.current) {
- const fontSizePx = parseFloat(
- getComputedStyle(receivedTextareaRef.current).fontSize
- );
- const calculatedTextareaPaddingPx =
- calculatedTextareaPaddingEm * fontSizePx;
- const textareaReceiveScrollHeight = `${
- receivedTextareaRef.current.scrollHeight + calculatedTextareaPaddingPx
- }px`;
- const textareaExpectScrollHeight = `${
- expectedTextareaRef.current.scrollHeight + calculatedTextareaPaddingPx
- }px`;
-
- if (textareaReceiveScrollHeight >= textareaExpectScrollHeight) {
- receivedTextareaRef.current.style.height = textareaReceiveScrollHeight;
- expectedTextareaRef.current.style.height = "100%";
- } else {
- expectedTextareaRef.current.style.height = textareaExpectScrollHeight;
- receivedTextareaRef.current.style.height = "100%";
- }
- }
- }, [receivedTextareaRef, expectedTextareaRef, newBugData, bug]);
+ const receivedTextarea = receivedTextareaRef.current;
+ const expectedTextarea = expectedTextareaRef.current;
+ if (!receivedTextarea || !expectedTextarea) return;
+
+ receivedTextarea.style.height = "auto";
+ expectedTextarea.style.height = "auto";
+
+ const maxScrollHeight = Math.max(
+ receivedTextarea.scrollHeight,
+ expectedTextarea.scrollHeight
+ );
+
+ // 5пх -- число, чтобы высота была чуть выше, чтобы не показывался скролл
+ const height = `${maxScrollHeight + 5}px`;
+ receivedTextarea.style.height = height;
+ expectedTextarea.style.height = height;
+ }, [bug.receive, bug.expect]);
const attachments = useStoreMap({
store: $attachmentsByBugId,