discourse/app/assets/javascripts/discourse
Keegan George d1f6e5f4f3
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Publish Assets / publish-assets (push) Waiting to run
Tests / core backend (push) Waiting to run
Tests / plugins backend (push) Waiting to run
Tests / core frontend (Chrome) (push) Waiting to run
Tests / plugins frontend (push) Waiting to run
Tests / themes frontend (push) Waiting to run
Tests / core system (push) Waiting to run
Tests / plugins system (push) Waiting to run
Tests / themes system (push) Waiting to run
Tests / core frontend (Firefox ESR) (push) Waiting to run
Tests / core frontend (Firefox Evergreen) (push) Waiting to run
Tests / chat system (push) Waiting to run
Tests / merge (push) Blocked by required conditions
FIX: Ctrl/Cmd + Enter search results should open in new tab (#34989)
## 🔍 Overview

Fixes accessibility issue where
<kbd>Ctrl</kbd>/<kbd>Cmd</kbd>+<kbd>Enter</kbd> on keyboard-navigated
search results opened in the same tab instead of a new tab. Users can
now use standard browser shortcuts when navigating search results with
arrow keys.

##  More Details

Discourse prevents default browser behavior on Enter key events in
search results to handle custom routing, analytics logging, and menu
management. This custom handling needed explicit modifier key detection
since the default browser
<kbd>Ctrl</kbd>/<kbd>Cmd</kbd>+<kbd>Enter</kbd> behavior was bypassed.
The fix adds proper <kbd>Ctrl</kbd>/<kbd>Cmd</kbd>+<kbd>Enter</kbd>
handling while preserving all existing functionality.

## 📷 Screen Recordings

### ← Before

https://github.com/user-attachments/assets/3b8715bf-c5bb-4f23-87f0-ee66b088b220



### → After  

https://github.com/user-attachments/assets/e235a311-bf27-467c-93d5-a9233228fae3



### 🔗 References


https://meta.discourse.org/t/open-in-new-tab-browser-keybind-fails-on-search-results/384004?u=keegan
2025-09-26 11:45:35 -07:00
..
app FIX: Ctrl/Cmd + Enter search results should open in new tab (#34989) 2025-09-26 11:45:35 -07:00
config DEV: Include mobile browserlist targets (#34707) 2025-09-04 01:51:06 +02:00
lib DEV: Drop ember-cli-based SCSS and locale compilation (#31407) 2025-02-21 11:15:04 +00:00
public/assets/scripts DEV: Deprecate Ember native array extensions (#34394) 2025-08-27 14:33:20 -03:00
scripts DEV: Update browser feature-detection and remove Safari 15 workaround (#34419) 2025-08-19 18:16:24 +01:00
tests FIX: Ctrl/Cmd + Enter search results should open in new tab (#34989) 2025-09-26 11:45:35 -07:00
.ember-cli
.npmrc
.watchmanconfig
ember-cli-build.js DEV: Silence Embroider staticTree deprecations (#34005) 2025-08-20 16:53:05 +01:00
package.json Build(deps-dev): Bump @swc/core from 1.13.5 to 1.13.19 (#34993) 2025-09-26 00:49:33 +02:00
testem.js DEV: new env var to disable browser sandbox (#34854) 2025-09-18 11:24:35 +10:00