Problem/Motivation

Sometimes when you search for a settings page with Admin Toolbar Search, you might want to open the result link in a new tab, instead of just hitting Enter.

You may try to Ctrl + click the link, but the page opens both in the current, and the new tab ...

Steps to reproduce

Proposed resolution

  • Either add support for Ctrl + click to only open the result link in a new tab
    OR
  • Add a new "Open result links in a new tab" setting on " Admin Toolbar Search settings " (/admin/config/user-interface/admin-toolbar-search)

Or perhaps both features could be considered? :)

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#3 3565861.patch974 bytesshank115

Comments

ressa created an issue. See original summary.

ressa’s picture

Issue summary: View changes
shank115’s picture

Status: Active » Needs review
StatusFileSize
new974 bytes

Added this logic:

if (event.ctrlKey || event.metaKey) {
      window.open(ui.item.linkUrl, '_blank');
    }

to open in new window if ctrl or cmd key is pressed

ressa’s picture

Status: Needs review » Needs work

Thanks! Maybe you can create a GitLab MR with a working example?

For details, see https://www.drupal.org/docs/develop/git/using-gitlab-to-contribute-to-dr....