How To Disable Drag And Drop With Elfinder

Drag and drop is cool, but for me i found that it was causing more trouble than good. So if you are like me and are sick of accidentally dropping a folder into another sub directory, then it’s best to just disable it completely. Unfortunately this cannot be done directly using the init settings (at least as far as i know it cant), but not to worry, it’s very easy to disable it anyway.

To disable drag and drop, you will need to open up “elfinder.js”. For me this file was minified which made it a little difficult to work with, but you don’t need to do much so don’t worry. Do a search of the file and look for the following. Make not that this is the minified code, so if it returns null, try mess around with it a bit and you will find it.

In my case i just deleted the droppable functionality. This meant the drag still worked, but it didn’t do anything. You can disable both if you like but for me droppable was enough as I got weird icon issues sometimes when draggable was disabled.

Search through the file and look for following code and just delete the contents of the droppable value.

draggable:"ui-draggable",droppable:""

 

To delete the draggable functionality you will also need to edit the elfinder.js file. Look for a line of code like the following

draggable:"ui-draggable"

All you need to do is remove the text from the variable.

draggable:""

Drag and drop is now disabled for elfinder.

Related Articles

Related Questions

What’s the Best Way to Safely Shut Down My VMware ESXi Server?

Hey everyone! I'm relatively new to server administration and need a bit of guidance. We have an HP server running VMware ESXi that's going...

Am I Just Following a False Passion in Programming?

I've been programming since I was 13, starting with Roblox, and explored platforms like Unreal, Unity, and Love2D over the years. Recently, I've taken...

Why am I getting a ‘not enough space’ error while extracting a large ZIP file?

I'm trying to extract a 17GB ZIP file onto a 1TB hard drive that has around 600GB of free space. The extraction process starts...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Latest Tools

Online Hash Generator – String to Hash Converter

Need to quickly generate a hash from a string? Whether you're verifying file integrity, securing data, or just experimenting with cryptographic tools, this simple...

Convert CSV To HTML Table

Need to quickly turn CSV data into an HTML table? Whether you're copying data from Excel, Google Sheets, or another spreadsheet, this tool makes...

Student Group Randomizer

Creating fair and balanced groups in the classroom can be time-consuming — especially when you're trying to avoid repetition, manage different skill levels, or...

Random Group Generator

Need to split a list of people, items, or ideas into random groups? Our free Random Group Generator makes it quick and easy. Whether...

Flip Text Upside Down – Free Online Tool

Ever wanted to flip your text upside down just for fun or to grab someone’s attention in a creative way? This free online Upside...

Raffle Ticket Generator

If you're running a fundraiser, charity draw, or local event and need raffle tickets fast, this free online tool lets you generate and print...

Latest Posts

Latest Questions