Forum Academy Marketplace Showcase Pricing Features

Input hit enter triggers other element to be clicked

Hello,

I have the following UI setup:

image

When inputing a value in search and hitting enter, it triggers the other two elements’s workflow to the right. I don’t understand how it’s possible.

On the backend I have 3 distinct workflows for each of these elements:

  1. Eraser button clicked:

  2. Toggle filters:
    image

  3. Search input value is changed:

My search input has the Enter key enabled because I want to do a buttonless search for UX speed.
image

I don’t understand how the input can trigger the elements next to it… Is this a bug or am I missing something?

Hi there, @umiumansa… have you tried using the debugger to run the search workflow in step-by-step mode to see if it can give you some insight into what is happening?

Best…
Mike

Yes i did and it gets triggered as if the button was clicked.

I think it’s a side effect of the other ticket that got resovled earlier where the input value is part of eraser button workflow?
Maybe Bubble sees the input as tied to the button and assumes that hitting enter means the button should be triggered?

You’re saying that’s the workflow that runs when the search input is in focus and the enter key is pressed? If so, then you must have a workflow set up that includes all of those steps. If you are saying you don’t and the app is randomly running those first two steps (which would be something I certainly haven’t seen before), then there is definitely a bug.

If you can share a read-only link to your editor, maybe someone can spot something you are missing.

There is no way to have a workflow trigger another “something is clicked” workflow is there?

Correction: only one workflow gets triggered (the eraser workflow).

To test the theory that the use of the input by the button triggers the button with Enter, I disabled the step 2 of the workflow of the eraser which uses the input’s value:

When I do that, the button doesn’t get triggered when hitting enter. So the theory stands.

Step 2 sets a state in the input element. I need that step in order to have the reset relevant inputs work.

So now there’s a 2-way relationship between button and input, whereas I expected only a one way relationship, i.e. the erase button should clear the value in the input field.

Resolved by placing the below condition on the Erase Button:
image