From 8b1406ede7389c9e50fa0c095be7a8524d265c8c Mon Sep 17 00:00:00 2001 From: Alex Vitkov Date: Mon, 15 Feb 2021 14:47:29 +0200 Subject: Text editor only works for files with write permissions --- loggedin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'loggedin.js') diff --git a/loggedin.js b/loggedin.js index 60a7d59..8d9e92f 100644 --- a/loggedin.js +++ b/loggedin.js @@ -348,7 +348,8 @@ function openfile_nondir() { xhr.onload = function () { focus.txt_editor.innerText = xhr.responseText; - focus.txt_editor.contentEditable = "true"; + if (open_file.write_permissions) + focus.txt_editor.contentEditable = "true"; }; } -- cgit v1.2.3