From 8800040821a033572146f825de0c04fc24c08c31 Mon Sep 17 00:00:00 2001 From: panr Date: Tue, 25 Feb 2020 10:02:36 +0100 Subject: [PATCH] Fix styles for restricted editing cursor behaviour --- .../restrictedediting.css | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/theme/ckeditor5-restricted-editing/restrictedediting.css b/theme/ckeditor5-restricted-editing/restrictedediting.css index 3e65558..15575f0 100644 --- a/theme/ckeditor5-restricted-editing/restrictedediting.css +++ b/theme/ckeditor5-restricted-editing/restrictedediting.css @@ -42,23 +42,24 @@ } } -.ck-restricted-editing_mode_restricted .restricted-editing-exception { - cursor: text; +.ck-restricted-editing_mode_restricted { + cursor: default; + /* We also have to override all elements inside the restricted editable to prevent cursor switching between default and text + during the pointer movement. */ & * { - cursor: text; + cursor: default; } - &:hover { - background: var(--ck-color-restricted-editing-exception-hover-background); - } -} + & .restricted-editing-exception { + cursor: text; -.ck-restricted-editing_mode_restricted { - cursor: default; + & * { + cursor: text; + } - /* For some reason, we also need to override user agent styles for links inside the editor. */ - & *:not(.restricted-editing-exception) { - cursor: default; + &:hover { + background: var(--ck-color-restricted-editing-exception-hover-background); + } } }