From 4657088d23af413510e82019e8e8f28c08ff8eac Mon Sep 17 00:00:00 2001 From: Timothy Allen Date: Sat, 26 Sep 2026 09:22:53 +0200 Subject: [PATCH] Keep the space of the line-break note under the image box. An invisible copy of the note sits under the image box, so the page does not jump when the tabs change. --- publish/style.css | 14 +++++++++----- publish/write.inc.php | 9 +++++++-- tests/php/Pages/SubmitTest.php | 14 ++++++++++++++ 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/publish/style.css b/publish/style.css index cb19f69..7a3dc3f 100644 --- a/publish/style.css +++ b/publish/style.css @@ -146,8 +146,10 @@ div.note { * that the box keeps its size when the tabs change: at most 450px wide, * and 337px high. That is the 300px writing area, the 35px toolbar (26px * buttons, 1px margins, 3px padding and a 1px line) and the 2px border. + * An invisible copy of the note under the editor takes the same space + * under the box. */ -#uploadparent { +#uploadparent > .upload { box-sizing: border-box; width: 100%; max-width: 450px; @@ -155,11 +157,13 @@ div.note { overflow: auto; border: 1px solid #b8c9be; border-radius: 8px; - margin-bottom: 10px; } -#uploadparent>div { +#uploadparent > .upload > div { padding: 10px; } +#uploadparent > .spacer { + visibility: hidden; +} .yes { font-weight: bold; @@ -336,7 +340,7 @@ ul.error-box li { } /* On a phone the editor toolbar wraps onto two lines of 42px (40px buttons and 1px margins), so the editor is 393px high */ - #uploadparent { + #uploadparent > .upload { max-width: none; height: 393px; } @@ -396,7 +400,7 @@ ul.error-box li { * (300px), so it wraps onto three lines and the editor is 435px high. */ @media (max-width: 345px) { - #uploadparent { + #uploadparent > .upload { height: 435px; } } diff --git a/publish/write.inc.php b/publish/write.inc.php index 77a44ce..d0cb1f0 100644 --- a/publish/write.inc.php +++ b/publish/write.inc.php @@ -50,14 +50,16 @@ if (count($validate) !== 0) { Image: +
-
(To get line-breaks—as in poetry—instead of paragraph breaks, hit shift-enter instead of enter.)
+
-