Skip to content

Support for multiple mouse buttons (Middle Click) in Sidebar navigation. #1305

@pedro-martins-brisa

Description

@pedro-martins-brisa

Currently, sidebar items use the (click) event in the HTML template. By default, this event is triggered only by the left mouse button. To allow the user to use common navigation behaviors, such as opening links in a new tab using the middle button (scroll) or Ctrl + Click, it is necessary to capture the click event before its default completion or use auxiliary events.

The change to the mousedown event (or the addition of auxclick) is necessary so that the component identifies the event.button property. This allows differentiating a regular click (button 0) from a scroll click (button 1), ensuring that the application can correctly emit the event for handleNavigation to handle the opening of new tabs.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions