浏览代码

Merge pull request #62 from ckeditor/t/58

Fix: Made the media interactive when the editor is in the read-only mode (just like links). Closes #58.
Kamil Piechaczek 7 年之前
父节点
当前提交
12a4920b6b
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6 4
      packages/ckeditor5-media-embed/theme/mediaembedediting.css

+ 6 - 4
packages/ckeditor5-media-embed/theme/mediaembedediting.css

@@ -6,10 +6,6 @@
 @import "@ckeditor/ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css";
 
 .ck-media__wrapper {
-	& > *:not(.ck-media__placeholder) {
-		pointer-events: none;
-	}
-
 	& .ck-media__placeholder {
 		display: flex;
 		flex-direction: column;
@@ -43,3 +39,9 @@
 		}
 	}
 }
+
+/* Disable all mouse interaction as long as the editor is not read–only.
+   https://github.com/ckeditor/ckeditor5-media-embed/issues/58 */
+*[contenteditable=true] .ck-media__wrapper > *:not(.ck-media__placeholder) {
+	pointer-events: none;
+}