From 93b58d834686a935842e9a585fe3a2c74a9a82f7 Mon Sep 17 00:00:00 2001 From: nmemmert Date: Thu, 28 May 2026 12:59:04 -0400 Subject: [PATCH] Fix suggest modal: portal to body + English word first MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Render modal via createPortal(…, document.body) so it's never clipped or offset by parent overflow/transform CSS — appears as a true centered overlay regardless of page scroll position - Reorder word rows: English definition leads (bold), then Greek lexeme, transliteration, and Strong's number — makes it easy to recognise words without reading the Greek Co-Authored-By: Claude Sonnet 4.6 --- src/App.jsx | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index b6d3b2b..bcf13ca 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,4 +1,5 @@ import { useEffect, useRef, useState } from 'react'; +import { createPortal } from 'react-dom'; import { Document, HeadingLevel, @@ -2111,8 +2112,8 @@ const restoreRemoteProject = async (id) => { - {/* Greek word picker modal */} - {suggestModal && ( + {/* Greek word picker modal — portalled to document.body so it's never clipped by parent CSS */} + {suggestModal && createPortal(
{ if (e.target === e.currentTarget) { setSuggestModal(null); setSuggestSelection(new Set()); } }} @@ -2143,7 +2144,7 @@ const restoreRemoteProject = async (id) => {
    {suggestModal.words.map((w) => (
  • -
  • @@ -2178,7 +2181,8 @@ const restoreRemoteProject = async (id) => { >Add {suggestSelection.size > 0 ? `${suggestSelection.size} word${suggestSelection.size > 1 ? 's' : ''}` : 'words'}
- + , + document.body )} );