mirror of https://github.com/vector-im/riot-web
				
				
				
			Show drop file UI only if dragging a file
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
							parent
							
								
									cd39474d26
								
							
						
					
					
						commit
						d547cd5db8
					
				| 
						 | 
				
			
			@ -1137,10 +1137,11 @@ export default class RoomView extends React.Component<IProps, IState> {
 | 
			
		|||
        ev.stopPropagation();
 | 
			
		||||
        ev.preventDefault();
 | 
			
		||||
 | 
			
		||||
        this.setState({
 | 
			
		||||
            dragCounter: this.state.dragCounter + 1,
 | 
			
		||||
            draggingFile: true,
 | 
			
		||||
        });
 | 
			
		||||
        this.setState({dragCounter: this.state.dragCounter + 1});
 | 
			
		||||
 | 
			
		||||
        if (ev.dataTransfer.types.includes("Files") || ev.dataTransfer.types.includes("application/x-moz-file")) {
 | 
			
		||||
            this.setState({draggingFile: true});
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    private onDragLeave = ev => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue