TootList: prevent clicks of A lift the toot
This commit is contained in:
		
							parent
							
								
									e68384349a
								
							
						
					
					
						commit
						bafa8f4e24
					
				
					 1 changed files with 8 additions and 3 deletions
				
			
		|  | @ -106,9 +106,9 @@ const TootList: Component<{ | ||||||
| 
 | 
 | ||||||
|         const target = actionableElement as HTMLAnchorElement; |         const target = actionableElement as HTMLAnchorElement; | ||||||
| 
 | 
 | ||||||
|         const acct = |         const acct = encodeURIComponent( | ||||||
|         encodeURIComponent(target.dataset.client || |           target.dataset.client || `@${new URL(target.href).origin}`, | ||||||
|           `@${new URL(target.href).origin}`); |         ); | ||||||
| 
 | 
 | ||||||
|         navigate(`/${acct}/profile/${target.dataset.acctId}`); |         navigate(`/${acct}/profile/${target.dataset.acctId}`); | ||||||
| 
 | 
 | ||||||
|  | @ -116,6 +116,11 @@ const TootList: Component<{ | ||||||
|       } else { |       } else { | ||||||
|         console.warn("unknown action", actionableElement.dataset.rel); |         console.warn("unknown action", actionableElement.dataset.rel); | ||||||
|       } |       } | ||||||
|  |     } else if ( | ||||||
|  |       event.target.parentElement && | ||||||
|  |       event.target.parentElement.tagName === "A" | ||||||
|  |     ) { | ||||||
|  |       return; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // else if (!actionableElement || !checkIsExpended(status) || <rel is not one of known action>)
 |     // else if (!actionableElement || !checkIsExpended(status) || <rel is not one of known action>)
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue