From 37e6fab93a08c400b31cb884e47cea5fd2c02fa1 Mon Sep 17 00:00:00 2001 From: iseulde Date: Sun, 15 Sep 2019 13:11:03 +0300 Subject: [PATCH] Use text cursor for the placeholder --- .../src/components/rich-text/style.scss | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/block-editor/src/components/rich-text/style.scss b/packages/block-editor/src/components/rich-text/style.scss index d25b14151e139f..5e43d5ebf5ef9d 100644 --- a/packages/block-editor/src/components/rich-text/style.scss +++ b/packages/block-editor/src/components/rich-text/style.scss @@ -34,23 +34,21 @@ } } + [data-rich-text-placeholder] { + pointer-events: none; + cursor: text; + } + [data-rich-text-placeholder]::after { content: attr(data-rich-text-placeholder); - pointer-events: none; // Use opacity to work in various editor styles. // We don't specify the color here, because blocks or editor styles might provide their own. opacity: 0.62; } // Could be unset for individual rich text instances. - &.is-selected { - &.keep-placeholder-on-focus [data-rich-text-placeholder] { - pointer-events: none; - } - - &:not(.keep-placeholder-on-focus) [data-rich-text-placeholder]::after { - display: none; - } + &.is-selected:not(.keep-placeholder-on-focus) [data-rich-text-placeholder]::after { + display: none; } }