Issue Overview
When removing all text from <wp.blocks.RichText> the placeholder does not reappear. After saving and reloading the page, it has a new value a .
Steps to Reproduce (for bugs)
- Add a core/button
- Click
Add text... placeholder
- Type
asd
- Hit backspace 3 times
- Unfocus the element
Doesn't get it's placeholder back because the editable still contains  (ZERO WIDTH NO-BREAK SPACE), but the RichText's isEmpty() checks if the container is completely empty.
Bonus:
6. Save the page.
7. Refresh the editor.
8. Button now has content: a.
Chrome 64.0.3282.186
Expected Behavior
Should put the placeholder back, not when all text is deleted, but after the block has lost focus.
Current Behavior
Possible Solution
Screenshots / Video
Related Issues and/or PRs
Todos
Issue Overview
When removing all text from
<wp.blocks.RichText>the placeholder does not reappear. After saving and reloading the page, it has a new valuea.Steps to Reproduce (for bugs)
Add text...placeholderasdDoesn't get it's placeholder back because the editable still contains
(ZERO WIDTH NO-BREAK SPACE), but the RichText'sisEmpty()checks if the container is completely empty.Bonus:
6. Save the page.
7. Refresh the editor.
8. Button now has content:
a.Chrome 64.0.3282.186
Expected Behavior
Should put the placeholder back, not when all text is deleted, but after the block has lost focus.
Current Behavior
Possible Solution
Screenshots / Video
Related Issues and/or PRs
Todos