Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Prevent double text selection in the editor
Browse files Browse the repository at this point in the history
closes TryGhost/Ghost#9356
- it was possible to start a selection from outside of CodeMirror's control, this was confusing because text appeared to be selected but wasn't
- disable user selection on the outermost CodeMirror wrapper so that the selection behaves as it does with a normal textarea where the selection needs to start from inside the content area
  • Loading branch information
kevinansfield committed Jan 2, 2018
1 parent beeb486 commit 28be02f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/styles/layouts/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,8 @@
overflow: visible;
padding: 0;
background: transparent;
/* Prevent confusing select behaviour, see https://github.com/TryGhost/Ghost/issues/9356 */
user-select: none;
}

.gh-editor .CodeMirror-cursor {
Expand Down

0 comments on commit 28be02f

Please sign in to comment.