Skip to content

Fix incorrect block insertion point after blurring post title#3640

Merged
dcalhoun merged 2 commits into
developfrom
fix/incorrect-block-insertion-after-title-focus
Jun 21, 2021
Merged

Fix incorrect block insertion point after blurring post title#3640
dcalhoun merged 2 commits into
developfrom
fix/incorrect-block-insertion-after-title-focus

Conversation

@dcalhoun
Copy link
Copy Markdown
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.

Comment thread RELEASE-NOTES.txt
@peril-wordpress-mobile
Copy link
Copy Markdown

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
Copy Markdown
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