-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Description
What problem does this address?
When using the viewport preview feature (Mobile/Tablet/Desktop buttons in the editor toolbar), the editor canvas resizes but does not maintain scroll position relative to the currently selected block.
I'm always frustrated when switching between viewport sizes because I lose my place in the document. On longer pages, I have to manually scroll to find the block I was working on after each viewport switch. This significantly slows down the responsive design workflow.
Steps to reproduce:
- Create a page with multiple blocks (enough to require scrolling)
- Select a block that's not at the top of the page
- Click the viewport preview button (e.g., switch from Desktop to Mobile)
- Observe that the selected block is no longer visible in the viewport
What is your proposed solution?
Automatically scroll to the currently selected block after switching viewport preview modes.
The implementation would:
- Subscribe to device type changes in the editor store
- Track the currently selected block
- After the viewport transition animation completes (~500ms), scroll the selected block into view (centered)
I have an elegent working solution and am happy to submit a PR if this approach is acceptable - would love to see this improvement in 7.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Type] EnhancementA suggestion for improvement.A suggestion for improvement.