Permalink
Browse files

Draw other people's cursors behind CodeMirror.

Set z-index of other cursors to 0 so they don't interfere with codemirror's click handlers.  Without this, if you click on/around somebody else's cursor, your cursor won't move since the click is going to the pre element instead of to CodeMirror.
  • Loading branch information...
1 parent e778163 commit 9b0933f8a9ad21060c9d49891085574af451ce0b @mikelehen mikelehen committed Mar 17, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/codemirror-adapter.js
@@ -224,6 +224,7 @@ ot.CodeMirrorAdapter = (function () {
cursorEl.style.borderLeftColor = color;
cursorEl.style.height = (cursorCoords.bottom - cursorCoords.top) * 0.9 + 'px';
cursorEl.style.marginTop = (cursorCoords.top - cursorCoords.bottom) + 'px';
+ cursorEl.style.zIndex = 0;
cursorEl.setAttribute('data-clientid', clientId);
this.cm.addWidget(cursorPos, cursorEl, false);
return {

0 comments on commit 9b0933f

Please sign in to comment.