restore ctrl+click on item title clicking
This commit is contained in:
parent
02b98582b8
commit
4d98110282
@ -57,9 +57,17 @@ export default function Item ({ item, rank, belowTitle, right, full, children, s
|
|||||||
const viewedAt = commentsViewedAt(item)
|
const viewedAt = commentsViewedAt(item)
|
||||||
if (viewedAt) {
|
if (viewedAt) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
router.push(
|
if (e.ctrlKey || e.metaKey) {
|
||||||
|
window.open(
|
||||||
|
`/items/${item.id}?commentsViewedAt=${viewedAt}`,
|
||||||
|
'_blank',
|
||||||
|
'noopener,noreferrer'
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
router.push(
|
||||||
`/items/${item.id}?commentsViewedAt=${viewedAt}`,
|
`/items/${item.id}?commentsViewedAt=${viewedAt}`,
|
||||||
`/items/${item.id}`)
|
`/items/${item.id}`)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}} ref={titleRef} className={`${styles.title} text-reset me-2`}
|
}} ref={titleRef} className={`${styles.title} text-reset me-2`}
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user