# Prevent opening a new tab when dropping the file outside the drop area.

## Environment

<table>
    <tbody>
	    <tr>
	    	<td>Product Version</td>
	    	<td>8.1.1</td>
	    </tr>
	    <tr>
	    	<td>Product</td>
	    	<td>Progress® KendoReact Upload</td>
	    </tr>
    </tbody>
</table>

## Description

When I drop a file outside the drop area the file is opened in a new tab. How can I prevent this?

## Solution

To prevent a file from opening in a new tab when dropped outside the drop area, call `event.preventDefault()` in the `dragover` and `drop` event handlers attached to the window object.

This example showcases this approach here:

[Demo Source](https://demos.telerik.com/kendo-react-ui/knowledge-base/upload/upload-prevent-opening-in-new-tab/source.txt)
