prevent click through to comment on notification click

This commit is contained in:
keyan 2021-10-30 14:19:49 -05:00
parent da668106a3
commit 6dfbd1d1ce
2 changed files with 14 additions and 12 deletions

View File

@ -91,28 +91,26 @@ export default function UpVote ({ item, className }) {
<LongPressable
onLongPress={
async (e) => {
e.preventDefault()
e.stopPropagation()
if (!item || voteLock) return
console.log('hi1')
// we can't tip ourselves
if (noSelfTips) {
return
}
if (window.getSelection) {
window.getSelection().removeAllRanges()
} else if (document.selection) {
document.selection.empty()
}
setItem({ itemId: item.id, act, strike })
}
}
onShortPress={
me
? async (e) => {
e.preventDefault()
e.stopPropagation()
if (!item || voteLock) return
console.log('hi2')
// we can't tip ourselves
if (noSelfTips) {
@ -152,16 +150,18 @@ export default function UpVote ({ item, className }) {
}
>
<ActionTooltip notForm disable={noSelfTips} overlayText={overlayText()}>
<UpArrow
width={24}
height={24}
className={
`${styles.upvote}
${className || ''}
${noSelfTips ? styles.noSelfTips : ''}
${item?.meVote ? styles.voted : ''}`
}
`${styles.upvote}
${className || ''}
${noSelfTips ? styles.noSelfTips : ''}
${item?.meVote ? styles.voted : ''}`
}
onClick={e => {
e.stopPropagation()
}}
/>
</ActionTooltip>
</LongPressable>}

View File

@ -1,6 +1,8 @@
.upvote {
fill: grey;
user-select: none;
-webkit-user-select: none;
-webkit-touch-callout: none;
}
.upvote:hover {