v1.6.4: fix RichEditor auto-scroll when opening offers with multiple sections

Replace Quill editor.format() with direct DOM style manipulation to
avoid getSelection(true) calls that steal focus and scroll the page
to the sections area on mount.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
BOHA
2026-05-13 08:07:18 +02:00
parent 4cabba395d
commit 1db5060c42
2 changed files with 3 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "app-ts",
"version": "1.6.3",
"version": "1.6.4",
"description": "",
"main": "dist/server.js",
"scripts": {

View File

@@ -99,11 +99,8 @@ export default function RichEditor({
useLayoutEffect(() => {
if (!quillRef.current) return;
const editor = quillRef.current.getEditor();
editor.format("font", "tahoma");
editor.format("size", "14px");
// Quill auto-focuses on mount with existing content, which scrolls
// the page to the editor. Blur to prevent unwanted scroll.
editor.blur();
editor.root.style.fontFamily = "Tahoma, sans-serif";
editor.root.style.fontSize = "14px";
}, []);
return (