-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 Space key for button and summary elements #30244
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Size Change: +71 B (0%) Total Size: 1.03 MB
ℹ️ View Unchanged
|
ellatrix
force-pushed
the
fix/space-button
branch
from
August 12, 2021 08:05
59439fa
to
cfb6289
Compare
5 tasks
annezazu
added
[Feature] Rich Text
Related to the Rich Text component that allows developers to render a contenteditable
[Package] Rich text
/packages/rich-text
[Type] Bug
An existing feature does not function as intended
labels
Aug 25, 2021
anomiex
added a commit
to Automattic/jetpack
that referenced
this pull request
Sep 9, 2021
In WordPress/gutenberg#30244 they added a hack to avoid certain browsers activing a button instead of inserting a space. The hack uses `document.execCommand()`, which isn't available in jsdom. We can avoid it by just not using spaces in the string here, so let's do that.
Hi! This commit seems to have broken one of our unit tests. We're using jest and jsdom, which does not seem to provide |
anomiex
added a commit
to Automattic/jetpack
that referenced
this pull request
Sep 10, 2021
* Fix test errors in extensions/blocks/subscriptions/test/edit.js These aren't actually fatal and were present before, but they clutter the output when I'm trying to work out what's actually failing. * No idea what changed, but now there's just one... ... <BlockControlsFill/> instead of a <BlockControlsFill> with a bunch of content (including a second <BlockControlsFill>). UI looks the same as far as I can tell. * Avoid Gutenberg's "useSpace" hack in the rich-text component In WordPress/gutenberg#30244 they added a hack to avoid certain browsers activing a button instead of inserting a space. The hack uses `document.execCommand()`, which isn't available in jsdom. We can avoid it by just not using spaces in the string here, so let's do that. Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: matticbot <[email protected]> Co-authored-by: Brad Jorsch <[email protected]>
matticbot
pushed a commit
to Automattic/jetpack-base-styles
that referenced
this pull request
Sep 10, 2021
* Fix test errors in extensions/blocks/subscriptions/test/edit.js These aren't actually fatal and were present before, but they clutter the output when I'm trying to work out what's actually failing. * No idea what changed, but now there's just one... ... <BlockControlsFill/> instead of a <BlockControlsFill> with a bunch of content (including a second <BlockControlsFill>). UI looks the same as far as I can tell. * Avoid Gutenberg's "useSpace" hack in the rich-text component In WordPress/gutenberg#30244 they added a hack to avoid certain browsers activing a button instead of inserting a space. The hack uses `document.execCommand()`, which isn't available in jsdom. We can avoid it by just not using spaces in the string here, so let's do that. Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: matticbot <[email protected]> Co-authored-by: Brad Jorsch <[email protected]> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/1223092279
matticbot
pushed a commit
to Automattic/jetpack-storybook
that referenced
this pull request
Sep 10, 2021
* Fix test errors in extensions/blocks/subscriptions/test/edit.js These aren't actually fatal and were present before, but they clutter the output when I'm trying to work out what's actually failing. * No idea what changed, but now there's just one... ... <BlockControlsFill/> instead of a <BlockControlsFill> with a bunch of content (including a second <BlockControlsFill>). UI looks the same as far as I can tell. * Avoid Gutenberg's "useSpace" hack in the rich-text component In WordPress/gutenberg#30244 they added a hack to avoid certain browsers activing a button instead of inserting a space. The hack uses `document.execCommand()`, which isn't available in jsdom. We can avoid it by just not using spaces in the string here, so let's do that. Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: matticbot <[email protected]> Co-authored-by: Brad Jorsch <[email protected]> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/1223092279
matticbot
pushed a commit
to Automattic/jetpack-connection-ui
that referenced
this pull request
Sep 10, 2021
* Fix test errors in extensions/blocks/subscriptions/test/edit.js These aren't actually fatal and were present before, but they clutter the output when I'm trying to work out what's actually failing. * No idea what changed, but now there's just one... ... <BlockControlsFill/> instead of a <BlockControlsFill> with a bunch of content (including a second <BlockControlsFill>). UI looks the same as far as I can tell. * Avoid Gutenberg's "useSpace" hack in the rich-text component In WordPress/gutenberg#30244 they added a hack to avoid certain browsers activing a button instead of inserting a space. The hack uses `document.execCommand()`, which isn't available in jsdom. We can avoid it by just not using spaces in the string here, so let's do that. Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: matticbot <[email protected]> Co-authored-by: Brad Jorsch <[email protected]> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/1223092279
matticbot
pushed a commit
to Automattic/jetpack-identity-crisis
that referenced
this pull request
Sep 10, 2021
* Fix test errors in extensions/blocks/subscriptions/test/edit.js These aren't actually fatal and were present before, but they clutter the output when I'm trying to work out what's actually failing. * No idea what changed, but now there's just one... ... <BlockControlsFill/> instead of a <BlockControlsFill> with a bunch of content (including a second <BlockControlsFill>). UI looks the same as far as I can tell. * Avoid Gutenberg's "useSpace" hack in the rich-text component In WordPress/gutenberg#30244 they added a hack to avoid certain browsers activing a button instead of inserting a space. The hack uses `document.execCommand()`, which isn't available in jsdom. We can avoid it by just not using spaces in the string here, so let's do that. Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: matticbot <[email protected]> Co-authored-by: Brad Jorsch <[email protected]> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/1223092279
matticbot
pushed a commit
to Automattic/jetpack-boost-production
that referenced
this pull request
Sep 10, 2021
* Fix test errors in extensions/blocks/subscriptions/test/edit.js These aren't actually fatal and were present before, but they clutter the output when I'm trying to work out what's actually failing. * No idea what changed, but now there's just one... ... <BlockControlsFill/> instead of a <BlockControlsFill> with a bunch of content (including a second <BlockControlsFill>). UI looks the same as far as I can tell. * Avoid Gutenberg's "useSpace" hack in the rich-text component In WordPress/gutenberg#30244 they added a hack to avoid certain browsers activing a button instead of inserting a space. The hack uses `document.execCommand()`, which isn't available in jsdom. We can avoid it by just not using spaces in the string here, so let's do that. Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: matticbot <[email protected]> Co-authored-by: Brad Jorsch <[email protected]> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/1223092279
matticbot
pushed a commit
to Automattic/jetpack-backup-plugin
that referenced
this pull request
Sep 10, 2021
* Fix test errors in extensions/blocks/subscriptions/test/edit.js These aren't actually fatal and were present before, but they clutter the output when I'm trying to work out what's actually failing. * No idea what changed, but now there's just one... ... <BlockControlsFill/> instead of a <BlockControlsFill> with a bunch of content (including a second <BlockControlsFill>). UI looks the same as far as I can tell. * Avoid Gutenberg's "useSpace" hack in the rich-text component In WordPress/gutenberg#30244 they added a hack to avoid certain browsers activing a button instead of inserting a space. The hack uses `document.execCommand()`, which isn't available in jsdom. We can avoid it by just not using spaces in the string here, so let's do that. Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: matticbot <[email protected]> Co-authored-by: Brad Jorsch <[email protected]> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/1223092279
matticbot
pushed a commit
to Automattic/jetpack-production
that referenced
this pull request
Sep 10, 2021
* Fix test errors in extensions/blocks/subscriptions/test/edit.js These aren't actually fatal and were present before, but they clutter the output when I'm trying to work out what's actually failing. * No idea what changed, but now there's just one... ... <BlockControlsFill/> instead of a <BlockControlsFill> with a bunch of content (including a second <BlockControlsFill>). UI looks the same as far as I can tell. * Avoid Gutenberg's "useSpace" hack in the rich-text component In WordPress/gutenberg#30244 they added a hack to avoid certain browsers activing a button instead of inserting a space. The hack uses `document.execCommand()`, which isn't available in jsdom. We can avoid it by just not using spaces in the string here, so let's do that. Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: matticbot <[email protected]> Co-authored-by: Brad Jorsch <[email protected]> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/1223092279
loisthompson068
added a commit
to loisthompson068/jetpack-base-styles-wordpress-plugin
that referenced
this pull request
Sep 14, 2022
* Fix test errors in extensions/blocks/subscriptions/test/edit.js These aren't actually fatal and were present before, but they clutter the output when I'm trying to work out what's actually failing. * No idea what changed, but now there's just one... ... <BlockControlsFill/> instead of a <BlockControlsFill> with a bunch of content (including a second <BlockControlsFill>). UI looks the same as far as I can tell. * Avoid Gutenberg's "useSpace" hack in the rich-text component In WordPress/gutenberg#30244 they added a hack to avoid certain browsers activing a button instead of inserting a space. The hack uses `document.execCommand()`, which isn't available in jsdom. We can avoid it by just not using spaces in the string here, so let's do that. Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: matticbot <[email protected]> Co-authored-by: Brad Jorsch <[email protected]> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/1223092279
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
[Package] Rich text
/packages/rich-text
[Type] Bug
An existing feature does not function as intended
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Alternative to #24558.
Currently it's not possible to use rich text with the BUTTON and SUMMARY tag names because the space key doesn't work. This PR fixes the issue.
How has this been tested?
Screenshots
Types of changes
Checklist: