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

Can't input a space in Form's submit button #2429

Closed
HardeepAsrani opened this issue Nov 2, 2024 · 4 comments · Fixed by #2440
Closed

Can't input a space in Form's submit button #2429

HardeepAsrani opened this issue Nov 2, 2024 · 4 comments · Fixed by #2440
Assignees
Labels
bug This label could be used to identify issues that are caused by a defect in the product. regression Issue represents a change in behavior from a previous version that is not intended or desired..

Comments

@HardeepAsrani
Copy link
Member

Description

It looks like you can't add a space directly in the Submit button of the Form block. You can only add it by copy/pasting it as typing a space is stripping it away.

Step-by-step reproduction instructions

  1. Add a form block.
  2. Try to modify the submit message with something like "Send Now"
  3. You will notice the space isn't inputted.

Screenshots, screen recording, code snippet or Help Scout ticket

No response

Environment info

No response

Is the issue you are reporting a regression

Yes, this is a regression.

@HardeepAsrani HardeepAsrani added the bug This label could be used to identify issues that are caused by a defect in the product. label Nov 2, 2024
@pirate-bot pirate-bot added the regression Issue represents a change in behavior from a previous version that is not intended or desired.. label Nov 2, 2024
@girishpanchal30
Copy link
Contributor

@HardeepAsrani I've reviewed it and found that the issue appears to be with multiline={false}. If we set it to {true}, it also allows typing whitespace.

This issue might have started from here.

Do you have any suggestions on how to fix this issue?

Thanks

@HardeepAsrani
Copy link
Member Author

@girishpanchal30 RichText's behavior has changed with time, and you can review the props to see which one work the best to disallow line breaks but allow white spaces: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-editor/src/components/rich-text/index.js#L80

@girishpanchal30
Copy link
Contributor

@HardeepAsrani Thank you! I've resolved the whitespace issue with this PR. Please review it when you have a chance. Thanks

@rodica-andronache
Copy link

@girishpanchal30 it's working well 👍 It's also fixing this #1977

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This label could be used to identify issues that are caused by a defect in the product. regression Issue represents a change in behavior from a previous version that is not intended or desired..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants