diff --git a/thoughts/templates/thoughts/index.html b/thoughts/templates/thoughts/index.html index 2d9997f..e146aaa 100644 --- a/thoughts/templates/thoughts/index.html +++ b/thoughts/templates/thoughts/index.html @@ -151,7 +151,7 @@ showMoreButton.parentNode.removeChild(showMoreButton); // Show the extended text extended.classList.remove("hidden"); - }) + }); main.appendChild(showMoreButton); } diff --git a/thoughts/templates/thoughts/post.html b/thoughts/templates/thoughts/post.html index ed4fb5c..a0d417f 100644 --- a/thoughts/templates/thoughts/post.html +++ b/thoughts/templates/thoughts/post.html @@ -113,6 +113,13 @@ for (const box of textboxes) { // Set the initial heights of the boxes updateBoxHeight(box); + // This works fine in Blink, but in Firefox this fails, + // more often on a complex page (pretty much every time on this page; + // less often if I start commenting stuff out, but it still happens) + // So after the first render this re-runs the updateBoxHeight to make sure. + // This does lead to a flash of short-boxes, but it's better than nothing. + setTimeout(updateBoxHeight.bind(null, box), 0); + // Add an event listener to update the box height on key press box.addEventListener("input", evt => updateBoxHeight(box)); // Allow pasting images into either text box