Skip to content

Commit

Permalink
Fix v shortcut not firing the proper event
Browse files Browse the repository at this point in the history
  • Loading branch information
PhrozenByte committed Nov 24, 2023
1 parent dfa4df6 commit 0a50a4a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions client/js/templates/EntriesPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,13 @@ function reloadList({
* @param {number} selected
*/
function openSelectedArticle(selected) {
const link = document.querySelector(`.entry[data-entry-id="${selected}"] .entry-datetime`);
const link = document.querySelector(`.entry[data-entry-id="${selected}"] .entry-newwindow`);
if (selfoss.config.openInBackgroundTab) {
// In Chromium, this will just cause the tab to open in the foreground.
// Appears to be disallowed by the pop-under prevention:
// https://crbug.com/431335
// https://crbug.com/487919
const event = new MouseEvent(
'click',
{
ctrlKey: true,
}
);
const event = new MouseEvent('click', { ctrlKey: true, bubbles: true});
link.dispatchEvent(event);
} else {
// open item in new window
Expand Down

0 comments on commit 0a50a4a

Please sign in to comment.