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

RichText: fix isSelected #17451

Merged
merged 1 commit into from
Sep 16, 2019
Merged

RichText: fix isSelected #17451

merged 1 commit into from
Sep 16, 2019

Conversation

ellatrix
Copy link
Member

Description

Attempt to fix #17405. Looks like the isSelected prop should only be looked at if the current block is selected. Currently we assume that the block manages that, but in previous versions there was a check internally if the wrapping block is selected.

How has this been tested?

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@ellatrix
Copy link
Member Author

@afercia Would be great to know if this fixes your issue. #17405 (comment)

@youknowriad
Copy link
Contributor

I tested this PR in addition with #17450 and the Yoast blocks seem to work properly. I also did a round of test for other blocks, everything seems to work as intended.

I'm approving both PRs. It would be good to try to add an e2e test for this.

@youknowriad youknowriad merged commit 61f4a25 into master Sep 16, 2019
@youknowriad youknowriad deleted the try/is-selected-fix branch September 16, 2019 13:56
@youknowriad youknowriad added [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Bug An existing feature does not function as intended labels Sep 16, 2019
@youknowriad youknowriad added this to the Gutenberg 6.5 milestone Sep 16, 2019
@ellatrix
Copy link
Member Author

Yes, I agree. We specifically need an implementation RichText in a block where the block doesn't remove rich text selection state based on block selection.

@afercia
Copy link
Contributor

afercia commented Sep 16, 2019

Thanks! Seems to work for me. Was waiting for my colleagues to double check :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RichText changes and custom blocks backwards compatibility for WP 5.3
3 participants