From 1db5060c42d0e6bbce5016587f9658d6988bf660 Mon Sep 17 00:00:00 2001 From: BOHA Date: Wed, 13 May 2026 08:07:18 +0200 Subject: [PATCH] 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 --- package.json | 2 +- src/admin/components/RichEditor.tsx | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 96afe92..917e800 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "app-ts", - "version": "1.6.3", + "version": "1.6.4", "description": "", "main": "dist/server.js", "scripts": { diff --git a/src/admin/components/RichEditor.tsx b/src/admin/components/RichEditor.tsx index 9e5de25..41fbf86 100644 --- a/src/admin/components/RichEditor.tsx +++ b/src/admin/components/RichEditor.tsx @@ -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 (