Skip to content

Duplicate horizontal scrollbars on blocks in editor #297

@helgatheviking

Description

@helgatheviking

Hi Weston,

Reporting this from Twitter.

Status:
Your plugin active
theme: Twenty Twenty One
WP: 5.6.2
Gutenberg plugin: none

I am seeing the code block get 2 horizontal scrollbars.
image

One appears to be on the <pre> element and the second on the nested <div>. Here's the markup showing in the console.

<pre id="block-ef27753d-7549-4f66-b7e8-ca54144eeca7" tabindex="0" role="group" aria-label="Block: Code" data-block="ef27753d-7549-4f66-b7e8-ca54144eeca7" data-type="core/code" data-title="Code" class="wp-block-code block-editor-block-list__block wp-block"><div role="textbox" aria-multiline="true" aria-label="Code" style="white-space: pre-wrap;" class="block-editor-rich-text__editable shcb-textedit  rich-text" contenteditable="true">apply_filters( 'name_of_target_filter', $variable_getting_filtered, $priority, $other_arg ); <br data-rich-text-line-break="true"></div><div aria-hidden="true" class="code-block-overlay" style="font-family: Menlo, Consolas, monaco, monospace; font-size: 18px; overflow: auto; overflow-wrap: break-word; resize: none;"><span class="loc">apply_filters( 'name_of_target_filter', $variable_getting_filtered, $priority, $other_arg ); </span><span class="loc"> </span></div></pre>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions