{"id":970,"date":"2017-12-12T11:50:16","date_gmt":"2017-12-12T06:20:16","guid":{"rendered":"https:\/\/blog.binarybits.net\/?p=970"},"modified":"2017-12-12T11:50:53","modified_gmt":"2017-12-12T06:20:53","slug":"sharepoint-disable-drag-drop","status":"publish","type":"post","link":"https:\/\/blog.binarybits.net\/sharepoint-disable-drag-drop\/","title":{"rendered":"Sharepoint disable drag and drop"},"content":{"rendered":"
In some scenarios we might need to disabled drag and drop in SharePoint sites.<\/p>\n
The following code works when we need to disable a page with one document view.<\/p>\n
Add the html code in content editor web part where the document view is there.<\/p>\n
<style type=\"text\/css\">\r\n \/*-- Hide Drag & Drop --*\/ \r\n caption.ms-dragDropAttract {\r\n caption-side: bottom;\r\n display: none !important;\r\n }\r\n<\/style>\r\n\r\n<script type=\"text\/javascript\">\r\n \/*-- Stop Drag & Drop --*\/\r\n ExecuteOrDelayUntilScriptLoaded(function() {\r\n g_uploadType = DragDropMode.NOTSUPPORTED;\r\n SPDragDropManager.DragDropMode = DragDropMode.NOTSUPPORTED;\r\n SPDragDropManager.DargDropMode.style.display = \"none\";\r\n }, \"DragDrop.js\");\r\n<\/script><\/pre>\nFor pages with multiple document libraries when you want to target a specific library prepend the id of the web part div and an underscore e.g. WebPartWPQ4_<\/p>\n
#WebPartWPQ4_ms-dnd-dropbox{ display: none !important; }<\/pre>\nSource:\u00a0https:\/\/sharepoint.stackexchange.com\/questions\/82805\/how-can-i-disable-the-document-library-drag-and-drop-function<\/p>\n","protected":false},"excerpt":{"rendered":"
In some scenarios we might need to disabled drag and drop in SharePoint sites. The following code works when we need to disable a page with one document view. Add the html code in content editor web part where the document view is there. <style type=”text\/css”> \/*– Hide Drag & Drop –*\/ caption.ms-dragDropAttract { caption-side: […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[62],"tags":[269,208],"yoast_head":"\n
Sharepoint disable drag and drop : Binary Bits<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n