fix: ctrl+click with spa enabled
This commit is contained in:
		
							parent
							
								
									3268d45a20
								
							
						
					
					
						commit
						f66d2c23ac
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -92,7 +92,7 @@ function createRouter() {
 | 
				
			||||||
  if (typeof window !== "undefined") {
 | 
					  if (typeof window !== "undefined") {
 | 
				
			||||||
    window.addEventListener("click", async (event) => {
 | 
					    window.addEventListener("click", async (event) => {
 | 
				
			||||||
      const { url } = getOpts(event) ?? {}
 | 
					      const { url } = getOpts(event) ?? {}
 | 
				
			||||||
      if (!url) return
 | 
					      if (!url || event.ctrlKey || event.metaKey) return
 | 
				
			||||||
      event.preventDefault()
 | 
					      event.preventDefault()
 | 
				
			||||||
      try {
 | 
					      try {
 | 
				
			||||||
        navigate(url, false)
 | 
					        navigate(url, false)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue