fix(xo-web/link): middle click opens two tabs in firefox (#3825)
Fixes #3450
This commit is contained in:
parent
f25705d559
commit
e9d1876699
@ -7,6 +7,7 @@
|
|||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
|
||||||
- [New SR] No redirection if the SR creation failed or canceled [#3843](https://github.com/vatesfr/xen-orchestra/issues/3843) (PR [#3853](https://github.com/vatesfr/xen-orchestra/pull/3853))
|
- [New SR] No redirection if the SR creation failed or canceled [#3843](https://github.com/vatesfr/xen-orchestra/issues/3843) (PR [#3853](https://github.com/vatesfr/xen-orchestra/pull/3853))
|
||||||
|
- [Home] Fix two tabs opened by middle click in Firefox [#3450](https://github.com/vatesfr/xen-orchestra/issues/3450) (PR [#3825](https://github.com/vatesfr/xen-orchestra/pull/3825))
|
||||||
|
|
||||||
### Released packages
|
### Released packages
|
||||||
|
|
||||||
|
@ -50,7 +50,8 @@ export class BlockLink extends Component {
|
|||||||
// FIXME: when https://github.com/facebook/react/issues/8529 is fixed,
|
// FIXME: when https://github.com/facebook/react/issues/8529 is fixed,
|
||||||
// remove and use onAuxClickCapture.
|
// remove and use onAuxClickCapture.
|
||||||
// In Chrome ^55, middle-clicking triggers auxclick event instead of click
|
// In Chrome ^55, middle-clicking triggers auxclick event instead of click
|
||||||
if (ref !== null) {
|
// Other browsers may trigger both events.
|
||||||
|
if (!!window.chrome && ref !== null) {
|
||||||
ref.addEventListener('auxclick', this._onClickCapture)
|
ref.addEventListener('auxclick', this._onClickCapture)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user