From 6fc770c0f847d65b9abba3d5ec21b379741bde17 Mon Sep 17 00:00:00 2001 From: Kamil Mielnik Date: Mon, 26 Aug 2024 02:30:10 +0700 Subject: [PATCH] Fix focus state misaligned --- packages/scrabble-solver/src/components/Board/Board.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/scrabble-solver/src/components/Board/Board.tsx b/packages/scrabble-solver/src/components/Board/Board.tsx index ac2b2989..1fed3cc1 100644 --- a/packages/scrabble-solver/src/components/Board/Board.tsx +++ b/packages/scrabble-solver/src/components/Board/Board.tsx @@ -9,7 +9,7 @@ import { useDispatch } from 'react-redux'; import { useAppLayout } from 'hooks'; import { LOCALE_FEATURES } from 'i18n'; -import { BORDER_WIDTH, TRANSITION } from 'parameters'; +import { TRANSITION } from 'parameters'; import { boardSlice, cellFilterSlice, @@ -176,8 +176,8 @@ const Board: FunctionComponent = ({ className }) => { ref={floatingFocus.refs.setFloating} style={{ position: floatingFocus.strategy, - top: floatingFocus.y + cellSize - (showCoordinates === 'hidden' ? 0 : BORDER_WIDTH), - left: floatingFocus.x - (showCoordinates === 'hidden' ? 0 : BORDER_WIDTH), + top: floatingFocus.y + cellSize, + left: floatingFocus.x, width: cellSize, height: cellSize, opacity: hasFocus ? 1 : 0,