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) => {
 | 
			
		||||
        this.handleLinkClick(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)
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleLinkClick: function (event) {
 | 
			
		||||
      const el = event.currentTarget
 | 
			
		||||
      console.log(this.usingElectron)
 | 
			
		||||
      console.log(el)
 | 
			
		||||
      event.preventDefault()
 | 
			
		||||
 | 
			
		||||
      // Check if it's a YouTube link
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue