Gutenberg: Quote block can lose cite tag

Created on 20 Aug 2018  Â·  8Comments  Â·  Source: WordPress/gutenberg

To Reproduce
Steps to reproduce the behavior:

  1. Create a Quote Block
  2. type one letter in the citation
  3. switch to the main quote field (or press shift+tab)
  4. switch back to the citation (tab) and backspace that one letter
  5. switch to another field (shift+tab)
  6. try to switch back to citation field (tab)

Expected behavior
I get a blinking cursor on the citation field, or tab takes me to the empty paragraph block

Screenshots
( element is completely missing from the dom)
image

Desktop (please complete the following information):

  • OS: Mac 10.13.6 (17G65)
  • Browser: Chrome Version 68.0.3440.106 (Official Build) (64-bit)
    (also happens in firefox on mac, and chrome on windows)

Additional context

  • Gutenberg version 3.6.2
[Feature] Blocks [Feature] Writing Flow [Type] Bug

All 8 comments

Tested and confirmed in Chrome 68.0.3440.106 using WordPress 4.9.8 and Gutenberg 3.6.2 but I didn't see the same bug happen when testing with Firefox 61.0.2. (36s)

HTML before:

<div class="components-autocomplete"><cite aria-label="Write citation…" aria-autocomplete="list" aria-expanded="false" role="textbox" aria-multiline="true" class="editor-rich-text__tinymce mce-content-body" contenteditable="true" data-is-placeholder-visible="false" id="mce_2"><br data-mce-bogus="1"></cite><div role="presentation"></div></div>

HTML after:

<div class="components-autocomplete"><br data-mce-bogus="1"></div>

data-mce-bogus
Seen at http://alittletestblog.com/wp-admin/post.php?post=14474&action=edit running WordPress 4.9.8 and Gutenberg 3.6.2 using Chrome 68.0.3440.106 on macOS 10.13.6. (1m13s)

Just for reference, can you note which version of Firefox you tested with?

Firefox (on Mac)
Version 61.0.1
Build ID 20180704003137

Can confirm. Looking for a fix.

Seems to just happen when you delete the letter from the cite and then blur the field.

The cause seems to be cite being an inline element and using that as a RichText container. If I use a div or footer, the problem seems to disappear.

@designsimply @collinanderson Does #9195 fix the issue for you?

8773 would fix this

Closed by #8785

Was this page helpful?
0 / 5 - 0 ratings