Skip to content

Commit

Permalink
Middle click on title to mark entry as read
Browse files Browse the repository at this point in the history
  • Loading branch information
PhrozenByte committed Nov 23, 2023
1 parent 7bb86ba commit c417100
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions client/js/templates/Item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,15 @@ export default function Item({ currentTime, item, selected, expanded, setNavExpa
[history, location, expanded, item.id]
);

const titleOnAuxClick = useCallback(
(event) => {
if (event.button === 1 && canWrite) {
selfoss.entriesPage.markEntryRead(item.id, true);
}
},
[item.id]
);

const starOnClick = useCallback(
(event) => {
event.preventDefault();
Expand Down Expand Up @@ -459,6 +468,7 @@ export default function Item({ currentTime, item, selected, expanded, setNavExpa
aria-expanded={expanded}
aria-current={selected}
tabIndex="0"
onAuxClick={titleOnAuxClick}
onKeyUp={handleKeyUp}
dangerouslySetInnerHTML={titleHtml}
/>
Expand Down

0 comments on commit c417100

Please sign in to comment.