Skip to content

[Writing Flow regression in 7.1] Down arrow key navigation fails to auto-scroll viewport when post title is visible #82839

Closed

Description

@kurikimuchi

Description

In WordPress 7.1, traversing downwards through paragraph blocks using the Down Arrow (↓) key fails to auto-scroll the canvas when the post title is visible in the viewport (scrollTop = 0). The caret hits the bottom boundary of the screen and gets locked.

Key contrast: Once the post title is scrolled out of view manually (e.g., via mouse wheel), the exact same Down Arrow navigation auto-scrolls smoothly as expected.

Expected behavior

The editor viewport should automatically scroll down following the caret across blocks, regardless of whether the post title is currently visible.

Actual behavior

The caret is trapped at the bottom edge of the visible screen. No scroll event is triggered until a manual scroll action (wheel or trackpad) pushes the title off-screen.

This is a critical writing flow regression introduced in 7.1 (verified working properly in 7.0.4 and 6.9.7 under identical conditions).

Step-by-step reproduction instructions

  1. Set up a clean WordPress 7.1 test environment with the Twenty Twenty-Five theme (no third-party plugins).
  2. Create a new post, enter a title, and insert 15–20 Paragraph blocks filled with text.
  3. Keep the editor at the very top so the post title is clearly visible (scrollTop = 0).
  4. Place the caret inside the first Paragraph block.
  5. Press and hold the Down Arrow (↓) key to traverse down through the blocks.
  6. Observe: As soon as the caret reaches the bottom edge of the visible screen, scrolling halts completely and the caret is blocked.
  7. Verify workaround: Scroll down slightly with the mouse wheel so the title leaves the screen, then press Down Arrow (↓) again — auto-scroll resumes normally.

Screenshots, screen recording, code snippet

WP7.1.mp4

Environment info

  • WordPress version: 7.1 (Confirmed regression from 7.0.4 / 6.9.7)
  • Gutenberg plugin: Not installed (WordPress Core block editor only)
  • Theme: Twenty Twenty-Five (Clean default installation)
  • Browser: Google Chrome (Latest)
  • OS: Windows 11
  • PHP: 8.5

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Activity

  1. hbhalodia commented on Sep 14, 2026

    @hbhalodia
    Contributor

    Hi @kurikimuchi, Thanks for the report. I tried to reproduce it with WordPress Playground with 7.1 version and I am unable to replicate the issue. Please check the below screencast. I have followed the steps mentioned in the ticket.

    Screen.Recording.2026-09-14.at.7.17.57.PM.mov

    Adding a needs testing label so contributors can test and we can take the ticket forward.

    Thanks,

  2. kurikimuchi commented on Sep 15, 2026

    @kurikimuchi
    Author

    Hi @hbhalodia ,

    Thank you for testing and adding the needs testing label!

    I checked your screen recording. Upon further testing, I noticed an important additional detail regarding the behavior:


    1. Not just at the title: The lock actually occurs anywhere on the screen. Even after manually scrolling down with the mouse wheel, continuing to traverse down with the Down Arrow (↓) key causes the caret to hit the bottom edge of the viewport and freeze again without triggering auto-scroll. The canvas simply fails to follow the caret downwards.
    2. Extensions tested: I tested this in an Incognito (Private) window with all extensions disabled, and the exact same issue persists.
    3. Environment: My reproduction was tested on clean, real-world server installations (not WordPress Playground) on Windows 11 + Google Chrome (Twenty Twenty-Five, no plugins).
    4. Regression context: Under the exact same browser/OS and server conditions, WordPress 7.0.4 works completely fine — the viewport smoothly scrolls down as the caret moves across blocks.

    It seems the editor canvas fails to trigger scrollIntoView (or its equivalent container scroll event) during keyboard navigation on Windows/Chromium.

    Looking forward to seeing results from other contributors testing on Windows 11 / Chrome. Thanks again!

  3. added
    OS IssuesIssues or PRs that are related to OS specific problems
    on Sep 16, 2026
  4. Mayank-Tripathi32 commented on Oct 7, 2026

    @Mayank-Tripathi32
    Member

    Hi @kurikimuchi

    I tried to reproduce this on current trunk (macOS, Chrome) with the steps above: Twenty Twenty-Five, 20 multi-line paragraphs, holding ↓ from the first paragraph. I also tried 100/125/150% display scaling, several viewport sizes and always-visible scrollbars, but the caret always reached the last block and the canvas scrolled with it.

    One change in 7.1 that could explain a Windows-only difference is #80708, which added an early exit to isEdge in @wordpress/dom when the block's edge is outside the viewport. If the last line is visible but the block's bottom padding is just below the viewport, it could report "not at the edge" and leave the caret stuck.

    @kurikimuchi, a few details would help narrow it down:

    • Your Windows display scaling (Settings → Display → Scale) and screen resolution.
    • Whether it also happens with shorter, one-line paragraphs.
    • Whether zooming the browser to 90% or 110% changes anything.

    I will also look into trying to reproduce this on my windows machine to pinpoint the cause in the meantime.

  5. kurikimuchi commented on Oct 7, 2026

    @kurikimuchi
    Author

    Hi @Mayank-Tripathi32

    Thank you for the detailed follow-up! Here are the results from testing in my environment:

    1. Windows Display Settings:

      • Device: Surface Pro 11 (default display settings)
      • Display scaling: 200% (Recommended)
      • Screen resolution: 2880 x 1920 (Recommended)
    2. Single-line paragraphs:

      • Yes, it reproduces consistently even with short, single-line paragraphs without any line breaks. The caret still gets stuck at the bottom block visible in the viewport.
    3. Browser zoom (90% / 110%):

      • Changing the browser zoom to 90% or 110% did not change the behavior; the issue still persists.

    Hope this helps narrow down the issue! Please let me know if there are any other checks or details you need.

  6. moved this from 📥 Todo to 🏗️ In Progress in WordPress 7.2 Editor Taskson Oct 15, 2026
  7. robelsust commented on Oct 15, 2026

    @robelsust

    I have investigated the root cause and submitted a fix in PR #84800.

    As @Mayank-Tripathi32 noted, the issue stemmed from the early exit in isEdge introduced in #80708: for single-line paragraphs near the bottom of the viewport, the text line sits just inside the viewport while the bottom boundary/padding extends slightly past innerHeight. Even though the distance is only a few pixels, isFarFromVerticalEdge evaluated to true, reporting that the caret was not at the edge and trapping arrow navigation.

    The PR:

    1. Restricts the early exit in isEdge to containers taller/wider than the viewport where the selection is far from the probed edge, preserving the Unintended scrolling when editing inside tall blocks (long paragraphs, long quotes, or tall table cells) — caret moves but editor scrolls unpredictably #73801 fix while restoring smooth auto-scroll navigation for standard blocks.
    2. Ensures dynamic coordinate recalculation and post-scroll measurement synchronization in scrollIfNoRange.
    3. Adds dedicated browser unit tests covering boundary edge navigation.
  8. moved this from 🏗️ In Progress to ✅ Done in WordPress 7.2 Editor Taskson Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Needs TestingNeeds further testing to be confirmed.OS IssuesIssues or PRs that are related to OS specific problems[Feature] Writing FlowBlock selection, navigation, splitting, merging, deletion...[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions