Make WordPress Core

Opened 3 months ago

Closed 3 months ago

#65507 closed defect (bug) (reported-upstream)

Custom HTML block: CSS/JS tab textarea loses scrollbar after save and reopen

Reported by: masum52 Owned by:
Priority: normal Milestone:
Component: Editor Version: 7.0
Severity: normal Keywords:
Cc: Focuses: ui, javascript, css

Description

Bug Description

In the Custom HTML block, when long code is added in the CSS or JavaScript
tab, the textarea scrollbar disappears after saving and reopening the block.
The bottom content becomes completely inaccessible.

Steps to Reproduce

  1. Add a Custom HTML block in the editor
  2. Switch to the CSS or JavaScript tab
  3. Paste a large amount of code (enough to overflow the textarea)
  4. Confirm scrollbar appears and scrolling works correctly
  5. Click Update to save the page
  6. Reopen the same Custom HTML block
  7. Switch to CSS or JavaScript tab again

Expected Result

Textarea should retain scrollbar and remain fully scrollable after reopen.

Actual Result

Scrollbar is missing. Cannot scroll. Bottom code is inaccessible.

Key Observation

Opening browser DevTools (Inspect Element) while the block is open
causes the scrollbar to reappear and scrolling works again temporarily.
This confirms it is a CSS repaint/reflow issue — the textarea overflow
state is not applied correctly on initial render after block reopen,
but a forced browser reflow triggered by DevTools corrects it.

Attachments (1)

Screen Recording 2026-06-22 at 1.04.15 PM.mov (7.0 MB ) - added by masum52 3 months ago.
Please check the attached video, when i change browser resize, then it's work, but by default when i change the tabs - Css, Javascript then it's not scrolling

Change History (2)

@masum52
3 months ago

Please check the attached video, when i change browser resize, then it's work, but by default when i change the tabs - Css, Javascript then it's not scrolling

#1 @wildworks
3 months ago

  • Milestone Awaiting Review
  • Resolutionreported-upstream
  • Status assignedclosed

Thanks for the report. This issue has already been reported upstream.

https://github.com/WordPress/gutenberg/issues/78545

Note: See TracTickets for help on using tickets.