diff --git a/app/coffee/modules/wiki/main.coffee b/app/coffee/modules/wiki/main.coffee index 381c4848..8aad38e7 100644 --- a/app/coffee/modules/wiki/main.coffee +++ b/app/coffee/modules/wiki/main.coffee @@ -238,6 +238,7 @@ EditableWikiContentDirective = ($window, $document, $repo, $confirm, $loading, $ $el.on "mouseup", ".view-wiki-content", (event) -> target = angular.element(event.target) return if getSelectedText() + return if not isEditable() return if target.is('a') return if target.is('pre') diff --git a/app/styles/layout/wiki.scss b/app/styles/layout/wiki.scss index 9bb55308..48cb40ab 100644 --- a/app/styles/layout/wiki.scss +++ b/app/styles/layout/wiki.scss @@ -24,10 +24,6 @@ position: relative; .view-wiki-content { &:hover { - .wysiwyg { - background: $whitish; - cursor: pointer; - } .edit { opacity: 1; top: -1.5rem; @@ -67,4 +63,12 @@ top: .4rem; } } + &.editable { + &:hover { + .wysiwyg { + background: $whitish; + cursor: pointer; + } + } + } }