Skip to content

Conversation

martin-brennan
Copy link
Contributor

@martin-brennan martin-brennan commented Aug 19, 2025

This commit adds a new auxclick event handler to the topic list item,
which calls the same click handler.

The auxclick event is triggered by auxiliary mouse buttons, such as
the middle mouse button. This fixes an issue where using the middle mouse button
on a topic card in Horizon anywhere but the topic title would not open the topic
in a new tab.

Normal topic list click functionality remains unchanged.

c.f. https://developer.mozilla.org/en-US/docs/Web/API/Element/auxclick_event

The areas in red were "dead zones" for middle click:

image

This commit adds a new `auxclick` event handler to the topic list item,
which calls the same `click` handler.

The `auxclick` event is triggered by auxiliary mouse buttons, such as
the middle mouse button. This fixes an issue where using the middle mouse button
on a topic card in Horizon anywhere but the topic title would not open the topic
in a new tab.

Normal topic list click functionality remains unchanged.

c.f. https://developer.mozilla.org/en-US/docs/Web/API/Element/auxclick_event
@@ -238,6 +238,7 @@ export default class Item extends Component {
{{this.highlightIfNeeded}}
{{on "keydown" this.keyDown}}
{{on "click" this.click}}
{{on "auxclick" this.click}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main change of this PR

@@ -117,6 +117,7 @@ export default {
metaKey: event.metaKey,
shiftKey: event.shiftKey,
button: event.button,
which: event.which,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@martin-brennan martin-brennan merged commit 27157d7 into main Aug 19, 2025
18 checks passed
@martin-brennan martin-brennan deleted the ux/handle-auxclick-topic-list branch August 19, 2025 23:53
yuriyaran pushed a commit that referenced this pull request Aug 21, 2025
This commit adds a new `auxclick` event handler to the topic list item,
which calls the same `click` handler.

The `auxclick` event is triggered by auxiliary mouse buttons, such as
the middle mouse button. This fixes an issue where using the middle
mouse button
on a topic card in Horizon anywhere but the topic title would not open
the topic
in a new tab.

Normal topic list click functionality remains unchanged.

c.f.
https://developer.mozilla.org/en-US/docs/Web/API/Element/auxclick_event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants