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 acct =
 | 
			
		||||
        encodeURIComponent(target.dataset.client ||
 | 
			
		||||
          `@${new URL(target.href).origin}`);
 | 
			
		||||
        const acct = encodeURIComponent(
 | 
			
		||||
          target.dataset.client || `@${new URL(target.href).origin}`,
 | 
			
		||||
        );
 | 
			
		||||
 | 
			
		||||
        navigate(`/${acct}/profile/${target.dataset.acctId}`);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -116,6 +116,11 @@ const TootList: Component<{
 | 
			
		|||
      } else {
 | 
			
		||||
        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>)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue