Skip to content

Conversation

@skjnldsv
Copy link
Member

Fix #52380

Regression from #45652

@skjnldsv skjnldsv added this to the Nextcloud 32 milestone Apr 25, 2025
@skjnldsv skjnldsv self-assigned this Apr 25, 2025
@skjnldsv skjnldsv requested a review from a team as a code owner April 25, 2025 13:04
@skjnldsv skjnldsv requested review from artonge, sorbaugh and susnux and removed request for a team April 25, 2025 13:04
@skjnldsv
Copy link
Member Author

/backport to stable31

// if ctrl+click / cmd+click (MacOS uses the meta key) or middle mouse button (button & 4), open in new tab
// also if there is no default action use this as a fallback
const metaKeyPressed = event.ctrlKey || event.metaKey || Boolean(event.button & 4)
const metaKeyPressed = event.ctrlKey || event.metaKey || event.button === 1
Copy link
Contributor

Choose a reason for hiding this comment

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

I see it should have been Boolean(event.buttons & 4) (missing s).
So its an binary mask for bit 4 which means mouse wheel.

But then also the condition in line 330 is wrong.

Copy link
Member Author

Choose a reason for hiding this comment

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

Does that mean line 348 is also wrong ?

image

Copy link
Contributor

Choose a reason for hiding this comment

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

yes button vs buttons

@juliusknorr
Copy link
Member

Any way we can add a test for this? I feel this broke quite a few times in the past already

@susnux
Copy link
Contributor

susnux commented May 7, 2025

Any way we can add a test for this? I feel this broke quite a few times in the past already

At least not checking new tab is opened with Cypress. Does not work by design and would need a different test runner like playwright

Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
@susnux susnux force-pushed the fix/middle-click branch from 515f8e3 to c446274 Compare May 7, 2025 08:29
@susnux
Copy link
Contributor

susnux commented May 7, 2025

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@skjnldsv skjnldsv merged commit e3e6a3b into master May 7, 2025
123 checks passed
@skjnldsv skjnldsv deleted the fix/middle-click branch May 7, 2025 08:53
@skjnldsv skjnldsv mentioned this pull request Aug 19, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 33, Nextcloud 32 Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: The hotkeys Middle-Click and Ctrl + Left-Click not open File/Folder in new tab

6 participants