Disabling input buttons does not work

I’m trying to make a scene in which I have a system of layers for the buttons in which you can’t touch the buttons of a lower layer by deactivating its input button, in the previous version it worked, in this one it doesn’t work anymore. Could someone help me? I leave here the scene. https://playcanvas.com/editor/scene/1291744

What do you mean by previous version?

And what are the steps to reproduce the problem?

The previous version was 1.49.4 now version 1.50.0 to reproduce the error is to touch any button on the screen. And when you click on the button, the input of the button is disabled. But you can still click. The problem is that even if you disable the button or the input, the button still works.

https://launch.playcanvas.com/1291744?debug=true&use_local_engine=https://code.playcanvas.com/playcanvas-1.49.4.js

Gives me the following behaviour on 1.49.4

Seems to be doing the same thing as 1.50.0

Am I missing a step here?

The problem I’m having is that even if you deactivate the button it still allows you to click. When you press that first button it should not let you press it again until you touch the button on the other screen that opens. In the previous version it worked perfectly for me because when you deactivate the input of the button it didn’t let you click again, but now even if you deactivate the buttons from the editor it still lets you click.
Before it used to work, I don’t know if it’s the version or what exactly it is because I just tried the previous version and it doesn’t work either, but last week it worked.

And it’s solved, it’s because of the input uses of the children, if the parent element has a child with an input for some reason the parent recognises that it’s its input.

You can prevent child event from triggering parent entities by using stopPropagation(); on the event that’s passed through to your function.

2 Likes

thanks