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

Feeling Stuck After My First Year in Computer Science – How Do I Start Building Projects?

Hey everyone! I'm a 19-year-old female who just wrapped up my first year studying computer science. I've completed courses in C++, HTML, CSS, a...

Why can’t my Spring Boot app connect to the PostgreSQL database in my Docker container?

I'm currently working with Docker to run PostgreSQL and pgAdmin4 as part of my learning process. My issue is with my Spring Boot application;...

Why Does My Phone Keep Showing “Connected Without Internet” at Home?

I've been grappling with a frustrating issue for months where my Samsung Galaxy A54 5G, which is linked to Verizon, keeps displaying "Connected Without...

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