Opened 6 years ago
Closed 6 years ago
#46290 closed defect (bug) (fixed)
Port from Gutenberg editor: Fix: Impossible to set empty array on editor-font-sizes.
Reported by: | jorgefilipecosta | Owned by: | desrosj |
---|---|---|---|
Milestone: | 5.2 | Priority: | normal |
Severity: | normal | Version: | 5.0 |
Component: | Editor | Keywords: | has-patch |
Focuses: | Cc: |
Description
This ticket ports to core a fix already applied in the Gutenberg editor plugin.
This part of the code is going to be removed from the plugin so it is important to get this change on the core.
Gutenberg PR: https://github.com/WordPress/gutenberg/pull/13824
More details:
When setting an empty array on editor-font-sizes theme support setting nothing happens, and the default font-sizes were used by the editor.
This patch fixes the problem and makes sure that when add_theme_support('editor-color-palette', array());
is added no available font sizes appear on the editor. This patch uses the same approach used in colors and makes the behavior consistent with what happens when an empty array is set on editor-color-palette.
Attachments (3)
Change History (14)
#1
@
6 years ago
- Keywords commit added
- Milestone changed from Awaiting Review to 5.1.1
- Version changed from trunk to 5.0
This ticket was mentioned in Slack in #core by lukecarbis. View the logs.
6 years ago
#7
@
6 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for backport.
I was going to note that even after setting editor-font-sizes
to array()
, the dropdown still "opens". But, that seems to be fixed upstream and can be expected in 5.2.
#8
@
6 years ago
I previously included the wrong upstream link for the bug I detailed. The correct PR is this one: https://github.com/WordPress/gutenberg/pull/13782.
This ticket was mentioned in Slack in #core by desrosj. View the logs.
6 years ago
#10
@
6 years ago
- Milestone changed from 5.1.1 to 5.2
During the 5.1.1 bug scrub today, it was decided to punt this to 5.2.
#11
@
6 years ago
- Keywords commit dev-reviewed removed
- Resolution set to fixed
- Status changed from reopened to closed
I have tested this after the changes from https://github.com/WordPress/gutenberg/pull/13782GB-13782 were merged into trunk
in [44808], and the field no longer displays an empty dropdown when an empty array is specified as the value for editor-font-sizes
theme support.
46290.diff looks good to me.