From 777935ecbe1e3d781bc4bbadf8f824323acc8c8d Mon Sep 17 00:00:00 2001 From: plebbitor Date: Fri, 10 Mar 2023 12:42:26 +0100 Subject: [PATCH] Revert "fix touch bug" This reverts commit 2d23d2e9963d08dc14bfcaf24b343045127e1cc2. --- src/components/Board.jsx | 81 +++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 46 deletions(-) diff --git a/src/components/Board.jsx b/src/components/Board.jsx index 1a66afdc..1b2c95fc 100644 --- a/src/components/Board.jsx +++ b/src/components/Board.jsx @@ -280,18 +280,10 @@ const Board = ({ setBodyStyle }) => { const targetElement = [...document.querySelectorAll('.post-reply')] .find(el => el.innerHTML.includes(cid)); if (targetElement) { - const rect = targetElement.getBoundingClientRect(); - if (rect.top < 0 || rect.bottom > window.innerHeight) { targetElement.scrollIntoView({ behavior: "instant" }); - } } } - function handleTouch(event) { - event.preventDefault(); - event.target.click(); - } - const handleStyleChange = (event) => { switch (event.target.value) { @@ -387,17 +379,17 @@ const Board = ({ setBodyStyle }) => { {defaultSubplebbits.map(subplebbit => ( [ - handleClickTitle(subplebbit.title, subplebbit.address)} + handleClickTitle(subplebbit.title, subplebbit.address)} >{subplebbit.title} ]  ))} [ - Settings + Settings ] [ - handleStyleChange({target: {value: "Yotsuba"}} + handleStyleChange({target: {value: "Yotsuba"}} )}>Home ] @@ -413,9 +405,9 @@ const Board = ({ setBodyStyle }) => {
- Settings + Settings   - handleStyleChange({target: {value: "Yotsuba"}} + handleStyleChange({target: {value: "Yotsuba"}} )}>Home
@@ -476,11 +468,8 @@ const Board = ({ setBodyStyle }) => { - - - - - + + @@ -500,12 +489,12 @@ const Board = ({ setBodyStyle }) => {
[ - Catalog + Catalog ]
- Catalog + Catalog
@@ -532,7 +521,7 @@ const Board = ({ setBodyStyle }) => { File:  filename.something (metadata) - + filename.something @@ -586,22 +575,22 @@ const Board = ({ setBodyStyle }) => { {getDate(thread.timestamp)}   - c/ - {thread.cid.slice(0, 8)} + c/ + {thread.cid.slice(0, 8)}   [ - handleClickThread(thread.cid)} className="reply-link" >Reply + handleClickThread(thread.cid)} className="reply-link" >Reply ] - ▶ +