-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix(files): middle click & ctrl new tab #52438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes button vs buttons
|
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>
|
/compile |
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>

Fix #52380
Regression from #45652