Merge pull request #17086 from nextcloud/bugfix/noid/ctrl-click-apps

Fix opening apps with Ctrl+click
This commit is contained in:
Roeland Jago Douma 2019-09-10 16:38:14 +02:00 committed by GitHub
commit 23b0b63c21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -77,10 +77,6 @@ export const setUp = () => {
$app = $app.closest('a')
}
// trigger redirect
// needed for ie, but also works for every browser
window.location = $app.href
if (event.which === 1 && !event.ctrlKey && !event.metaKey && $app.parent('#more-apps').length === 0) {
$app.find('svg').remove()
$app.find('div').remove() // prevent odd double-clicks
@ -89,6 +85,9 @@ export const setUp = () => {
? 'icon-loading-small'
: 'icon-loading-small-dark'
))
// trigger redirect
// needed for ie, but also works for every browser
window.location = $app.attr('href')
} else {
// Close navigation when opening app in
// a new tab