From 8f884af5d75700c29ce9c1273775fd37a1cb40bf Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Thu, 26 Jun 2025 10:21:35 -0400 Subject: [PATCH] fix: adjust drag handle vertical positioning for smaller size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update line height calculation from 24px to 20px handle height - Remove extra 4px offset that was compensating for old size - Handle now properly aligns with text baseline 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/lib/components/edra/extensions/drag-handle/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/edra/extensions/drag-handle/index.ts b/src/lib/components/edra/extensions/drag-handle/index.ts index cd20dbb..4c47075 100644 --- a/src/lib/components/edra/extensions/drag-handle/index.ts +++ b/src/lib/components/edra/extensions/drag-handle/index.ts @@ -324,7 +324,7 @@ export function DragHandlePlugin(options: GlobalDragHandleOptions & { pluginKey: const lineHeight = isNaN(parsedLineHeight) ? parseInt(compStyle.fontSize) * 1.2 : parsedLineHeight - rect.top += (lineHeight - 24) / 2 + rect.top += (lineHeight - 20) / 2 rect.top += paddingTop } // Li markers @@ -341,7 +341,7 @@ export function DragHandlePlugin(options: GlobalDragHandleOptions & { pluginKey: // Add 12px gap between drag handle and content // Position the handle inside the padding area, close to the text dragHandleElement.style.left = `${rect.left + paddingLeft - rect.width - 12}px` - dragHandleElement.style.top = `${rect.top - 4}px` // Offset for padding + dragHandleElement.style.top = `${rect.top}px` showDragHandle() }, keydown: () => {