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

Creating a custom procedure with % in the title collapses blocks pallet #2107

Open
BryceLTaylor opened this issue Sep 8, 2020 · 2 comments

Comments

@BryceLTaylor
Copy link
Contributor

Expected Behavior

Creating a block with a percent (%) symbol as the first character, such as "% [text or number input]" or with just the title "% asdf" it should create a block with that name.

Actual Behavior

When create a block with a text input as the first element and you make that text input start with a % sign it causes a number of problems.

First, if you add another element, the block shows up as blank in the Make a Block modal.
Screen Shot 2020-09-08 at 11 38 30 AM

Second, if you click OK nothing appears to happen. The modal does not close. Then if you close the modal, either by clicking off of it or clicking the x, the modal closes, but the block does not appear in the blocks workspace. Additionally, all of the blocks in the blocks Pallet become stacked on top of each other (scrolled all the way to the top.)
Screen Shot 2020-09-08 at 11 25 10 AM

It does not matter what the rest of the string in that initial text input is. If it is just a % symbol it does not show the first behavior until you add another element, such as a second text input, or a boolean input, etc.

This only the first text input that shows this bug. So if you add % signs to the start of other text inputs it works fine. You can also start a variable input with a % as the first element in the block and it will work fine (remove the initial text input.)

Also, if you click cancel after you get a blank block in the modal it does not rearrange the blocks in the block pallet.

Steps to Reproduce

Create a new project
Make a Block
In the first text input type any string that starts with a %
Click the modal so that it removes focus from that text input
note: the text appears on the block preview as expected
Add another element such as another text input
Note: Everything disappears from the block preview, showing a blank block
Click OK
Note: the modal does not close
Close the modal (click off the modal or click the x on the modal)
Note: All of the blocks in the blocks pallet are stacked on top of one another at the top of the pallet

Operating System and Browser

Mac Chrome

@apple502j
Copy link
Contributor

Duplicate of #1368

@BryceLTaylor
Copy link
Contributor Author

Thanks to Scratch user p-p-p-p-p-p-p-p-p-p- for the initial report here: https://scratch.mit.edu/discuss/topic/437821/?page=1#post-4400702

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants