Skip to content
Snippets Groups Projects
Commit de65b79f authored by Ed Schiebel's avatar Ed Schiebel Committed by SaltNPepa
Browse files

Show RCE only after typeing ENTER in text block

closes RCX-3017
flag=block_editor

test plan
  - add a text block to the page
  - click on it
  > expect the toolbar, but not the rce
  - type the ENTER key
  > expect the RCE to open
  - enter some text and save
  > expect the text in the block and the block to be selected
  - ENTER
  > expect the rce again

Change-Id: I0548e43ba7330bed0bd1e261f7b3f9665b0e408d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/370098


Tested-by: default avatarService Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: default avatarJacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
parent 77f6f2fb
No related merge requests found
......@@ -121,9 +121,10 @@ export const RCETextBlock = ({text, width, height, sizeVariant = 'auto'}: RCETex
if (enabled) {
return (
<div
data-placeholder={I18n.t('Click to edit rich text')}
data-placeholder={I18n.t('type <Enter> to edit rich text')}
role="treeitem"
aria-label={RCETextBlock.craft.displayName}
aria-selected={node.events.selected}
tabIndex={-1}
ref={el => {
el && connect(drag(el))
......@@ -131,10 +132,6 @@ export const RCETextBlock = ({text, width, height, sizeVariant = 'auto'}: RCETex
}}
className={clazz}
style={styl}
onClick={e => {
e.preventDefault()
setEditable(true)
}}
onKeyDown={handleKey}
>
{renderContent()}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment