Fix right clicking on links being treated as link clicks (#2355)
This commit is contained in:
parent
8c495ca94b
commit
65d36852ff
|
@ -334,14 +334,17 @@ export default Vue.extend({
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('auxclick', 'a[href^="http"]', (event) => {
|
$(document).on('auxclick', 'a[href^="http"]', (event) => {
|
||||||
|
// auxclick fires for all clicks not performed with the primary button
|
||||||
|
// only handle the link click if it was the middle button,
|
||||||
|
// otherwise the context menu breaks
|
||||||
|
if (event.button === 1) {
|
||||||
this.handleLinkClick(event)
|
this.handleLinkClick(event)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
handleLinkClick: function (event) {
|
handleLinkClick: function (event) {
|
||||||
const el = event.currentTarget
|
const el = event.currentTarget
|
||||||
console.log(this.usingElectron)
|
|
||||||
console.log(el)
|
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
// Check if it's a YouTube link
|
// Check if it's a YouTube link
|
||||||
|
|
Loading…
Reference in New Issue