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

Looking for Unique Project Ideas for A-Level Computer Science

I'm a first-year A-Level Computer Science student, and I need to create a project that utilizes an SQL database. The requirements state that it...

Advice for Coding Practice: Where to Start?

Hey everyone! I'm just getting started with coding and I want to dive into some hands-on practice. I've been using apps like Sololearn and...

Help Me Choose a Programming Specialization!

Hey everyone! I'm currently in my 6th semester of a Software Engineering degree and have dabbled in various programming languages along with some web...

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

OpenAI Token Calculator

This tool is a simple OpenAI token calculator, web-based utility designed to help you quickly estimate the number of tokens in your text when...

List Sorting Tool

Welcome to our innovative list ordering and management tool. This next-level platform enables you to sort a list of items in ascending or descending...

Sudoku Solver

Welcome to our free online Sudoku solving tool, an interactive platform for puzzle enthusiasts seeking a break from a Sudoku conundrum. This advanced platform...

Apply Image Filters To Image

Digital imagery in the modern world is all about reinforcing emotions and stories behind each photo we take. To amplify this storytelling, we are...

Add Watermark To Image

As the world is increasingly consumed by digital media, protecting your original images is paramount. We are thrilled to introduce you to our innovative...

CSV To Xml Converter

Welcome to our CSV to XML converter tool, a convenient and user-friendly solution for all your data conversion needs. This versatile tool on our...

Latest Posts

Latest Questions