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

Fix incorrect block insertion point after blurring post title #3640

Merged
merged 2 commits into from
Jun 21, 2021

Conversation

dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Jun 18, 2021

Fixes #3636. Selecting the title selection status within the same useSelect for reusable blocks caused the title selection status to become stale, due to the dependency array for the useSelect hook. The staleness caused the block insertion point to show up in the incorrect location after blurring the title text input.

To test: See WordPress/gutenberg#32831.

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered if this change warrants user-facing release notes more info and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jun 21, 2021

Wanna run full suite of Android and iOS UI tests? Click here and 'Approve' CI job!

Copy link
Contributor

@fluiddot fluiddot left a comment

Choose a reason for hiding this comment

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

dcalhoun added 2 commits June 21, 2021 11:23
Selecting the title selection status within the same `useSelect` for
reusable blocks caused the title selection status to become stale, due
to the dependency array for the `useSelect` hook.

The staleness caused the block insertion point to show up in the
incorrect location after blurring the title text input.
@dcalhoun dcalhoun force-pushed the fix/incorrect-block-insertion-after-title-focus branch from 455dded to 12cac37 Compare June 21, 2021 16:24
@dcalhoun dcalhoun enabled auto-merge June 21, 2021 16:24
@dcalhoun dcalhoun merged commit 4728d67 into develop Jun 21, 2021
@dcalhoun dcalhoun deleted the fix/incorrect-block-insertion-after-title-focus branch June 21, 2021 16:43
@dcalhoun dcalhoun added this to the 1.55.2 (17.6) milestone Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug Something isn't working Writing Flow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New-block indicator and newly added block is in the wrong position after selecting the Title
2 participants