fix accidental reply hit on mobile

This commit is contained in:
keyan 2023-10-26 15:49:28 -05:00
parent 835554b3cd
commit 30d8c92fe2
1 changed files with 10 additions and 10 deletions

View File

@ -168,8 +168,9 @@ export default forwardRef(function Reply ({ item, onSuccess, replyOpen, children
{replyOpen {replyOpen
? <div className={styles.replyButtons} /> ? <div className={styles.replyButtons} />
: ( : (
<div className={styles.replyButtons}>
<div <div
className={styles.replyButtons} onPointerDown={e => { className='pe-3' onPointerDown={e => {
if (!reply) { if (!reply) {
e.preventDefault() e.preventDefault()
ref?.current?.quoteReply({ selectionOnly: true }) ref?.current?.quoteReply({ selectionOnly: true })
@ -177,7 +178,6 @@ export default forwardRef(function Reply ({ item, onSuccess, replyOpen, children
setReply(!reply) setReply(!reply)
}} }}
> >
<div>
{reply ? 'cancel' : 'reply'} {reply ? 'cancel' : 'reply'}
</div> </div>
{/* HACK if we need more items, we should probably do a comment toolbar */} {/* HACK if we need more items, we should probably do a comment toolbar */}