Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCH: Resolve cursor jump to start in Paragraph Blocks upon selection #2305

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

vaurdan
Copy link
Contributor

@vaurdan vaurdan commented Mar 19, 2024

Description

We've identified and resolved an issue where clicking inside paragraph blocks incorrectly positioned the cursor at the block's start, due to conditional rendering of a custom SettingsProvider based on the block's selection state. By adjusting our approach to consistently apply the SettingsProvider to all paragraph blocks, we eliminated inconsistencies in the component tree, ensuring stable cursor behavior and simplifying the component's logic for enhanced reliability and maintainability.

Motivation and context

This change was necessitated by a disruptive user experience issue where the text cursor would unpredictably jump to the start of paragraph blocks, hampering content editing within the Gutenberg editor. By uniformly applying the SettingsProvider across all paragraph blocks, we not only addressed the root cause of the cursor misplacement but also enhanced the plugin's overall stability, contributing to a smoother editing workflow.

How has this been tested?

Tested locally

@vaurdan vaurdan added this to the 3.14.2 milestone Mar 19, 2024
@vaurdan vaurdan self-assigned this Mar 19, 2024
@vaurdan vaurdan requested a review from a team as a code owner March 19, 2024 12:42
Copy link
Collaborator

@acicovic acicovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is amazing!

@acicovic acicovic merged commit 22a5baa into develop Mar 19, 2024
36 checks passed
@acicovic acicovic deleted the fix/cursor-position-on-paragraphs branch March 19, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants