diff --git a/public/css/index.css b/public/css/index.css index d586128ea..b8779774a 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -241,16 +241,7 @@ body { .dropdown-menu > li > a { cursor: pointer; } -.other-cursors { - position:relative; - z-index:3; -} -.other-cursor { - width: 0px; - position: absolute; - border-right: none; -} -.dropdown-menu.other-cursor { +.dropdown-menu.CodeMirror-other-cursor { transition: none; } .cursortag { @@ -288,7 +279,7 @@ div[contenteditable]:empty:not(:focus):before{ .dropdown-menu .emoji { margin-bottom: 0 !important; } -.dropdown-menu.other-cursor { +.dropdown-menu.CodeMirror-other-cursor { max-height: 50vh; width: auto !important; overflow: auto; diff --git a/public/js/index.js b/public/js/index.js index f49c9da11..341db69ef 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -455,6 +455,7 @@ window.editor = CodeMirror.fromTextArea(textit, { addModeClass: true, readOnly: true, autoRefresh: true, + otherCursors: true, placeholder: "← Start by entering a title here\n===\nVisit /features if you don't know what to do.\nHappy hacking :)" }); var inlineAttach = inlineAttachment.editors.codemirror4.attach(editor); @@ -2719,7 +2720,7 @@ socket.on('online users', function (data) { console.debug(data); onlineUsers = data.users; updateOnlineStatus(); - $('.other-cursors').children().each(function (key, value) { + $('.CodeMirror-other-cursors').children().each(function (key, value) { var found = false; for (var i = 0; i < data.users.length; i++) { var user = data.users[i]; @@ -3044,11 +3045,11 @@ function buildCursor(user) { iconClass = 'fa-desktop'; break; } - if ($('.other-cursors').length <= 0) { - $("