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

Which Linux Desktop Environment or Window Manager Should I Choose?

I'm a Windows user planning to switch to Linux completely, and although I've tinkered with it a bit, I'm still a newbie. I'm looking...

Why Do Clients Hesitate to Work with Overseas Developers?

I've been running a design and development agency based in Pakistan, primarily serving clients in the US, for over two years. Throughout this time,...

What Linux distro is best for an older computer?

I'm looking for suggestions on which Linux distribution I should install on my old computer. Here are the specs: it's running on an Intel...

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

Erase Gemini Nano Banana Watermark

Below is a simple content eraser tool. It works very similar to the content aware fill tool that is used in Photoshop. You can...

Keep Your Screen Awake Tool

This simple online stay awake tool prevents your computer screen from going to sleep while you have this page open. It runs entirely in your...

Neural Network Simulation Tool

The Neural Network Visual Builder is an interactive, client-side tool designed to demystify deep learning. It allows users to drag-and-drop neural network layers to...

Ray Trace Simulator – Interactive Optical Ray Tracing Tool

This ray trace simulator lets you visualise how light rays move through an optical system in real time. You can trace beams as they...

Interactive CPU Architecture Simulator

This is an Interactive CPU Architecture Simulator that provides a hands-on, visual learning experience for understanding how a processor executes code. It models a...

AI Image Upscaler

Our AI Image Upscaler allows you to upload any image and instantly increase its resolution using advanced upscaling models. Choose between 2x, 3x or...

Latest Posts

Latest Questions