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

Adding shadows to "any" inputs makes that input only accept the shadow output type #3737

Closed
Alexejhero opened this issue Mar 11, 2020 · 2 comments
Labels
issue: bug Describes why the code or behaviour is wrong

Comments

@Alexejhero
Copy link

Alexejhero commented Mar 11, 2020

Describe the bug

Adding shadows to inputs which accept "Any" makes that input only accept the output type of the shadow (clearly not intended, block looks like it's supposed to connect, but snaps back)

To Reproduce

Steps to reproduce the behavior:

  1. Add the following to the toolbox:
<block type="logic_compare">
  <value name="A">
    <shadow type="text"></shadow>
  </value>
  <value name="B">
    <shadow type="text"></shadow>
  </value>
</block>
  1. Add a logic_compare block to the workspace somewhere where it's enabled
    8AyUtLo21R
  2. Try to override the shadow with a block of another output type and see what happens
    pogQZTGvyh

Expected behavior

The shadow should be overridden

Version

Using master

@Alexejhero Alexejhero added issue: triage Issues awaiting triage by a Blockly team member issue: bug Describes why the code or behaviour is wrong labels Mar 11, 2020
@BeksOmega
Copy link
Collaborator

BeksOmega commented Mar 11, 2020

I think this has to do with the logic_compare block in particular. It has a change listener that forces the types on the different inputs to be the same. And because your shadows are text blocks, the number block is not compatible.

Based on #1408 this is the desired behavior :/

[EDIT]
To fix this you could create your own text block that is also typed as "any". You'd have to make sure to only use it as a shadow though!

@Alexejhero
Copy link
Author

Okay, thank you.

@moniika moniika removed the issue: triage Issues awaiting triage by a Blockly team member label Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Describes why the code or behaviour is wrong
Projects
None yet
Development

No branches or pull requests

3 participants