Bug 386163 - Drag and drop changes text in the editor, even if readonly is enabled
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/textDND.js b/bundles/org.eclipse.orion.client.editor/web/orion/textview/textDND.js
index 4f4df4e..855f0de 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/textDND.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/textview/textDND.js
@@ -113,7 +113,10 @@
 		_onDragOver: function(e) {
 			var types = e.event.dataTransfer.types;
 			if (types) {
-				var allowed = types.contains ? types.contains("text/plain") : types.indexOf("text/plain") !== -1; //$NON-NLS-1$ //$NON-NLS-0$
+				var allowed = !this._view.getOptions("readonly"); //$NON-NLS-0$
+				if (allowed) {
+					allowed = types.contains ? types.contains("text/plain") : types.indexOf("text/plain") !== -1; //$NON-NLS-1$ //$NON-NLS-0$
+				}
 				if (!allowed) {
 					e.event.dataTransfer.dropEffect = "none"; //$NON-NLS-0$
 				}