SOLVED: When pressing space dropdown disappears

I’m on the latest version of bricks, the one that cae from July 04.

Brave, and when you press a space, the menu closes - I’ve noticed this in a few places now.

The way I managed to have a space here is by writing this in the URL and copy paste - but if you press “space” it closes - thus not being able to add a category with a space, from the UI itself.

Probably a dropdown issue or similar, as I had this issue yesterday elsewhere, but just not taking this into account as its annoying.

Hi Aurelian,
Thanks so much for your report!

You can open or close dropdowns by pressing the space or enter key on the keyboard, making the behavior somewhat understandable. However, the main question is: why do you want to add a space in front of your component categories?

Best regards,
timmse

When you’re in an input, and creating a category, a space is totally normal to add.

But I think were misunderstanding each other.

When I say “space”, I mean the “Mobile Menu” is not possible to write - that there I had to copy from somewhere to have he space in between the “Mobile” and “Menu”.

Currently, you can only write “MobileMenu”, and if you try to add a space between the “Mobile” and “Menu”, so you get “Mobile Menu”(like onthe screenshot) you can’t do that, the menu will close.

I used a workaround of copying and pasting the “Mobile Menu” with a space in between.

Overall, I don’t think the menu should close when you press a space while focusing on the input - unless this is by design choice, in that case if I do add a space, it should error out, if not allowed.

Generally speaking, you can see how Radix handles this, if you look at the third example block, if you’re in an input, adding a space adds a space, and to close the menu you need to tab away from that for the space to have a different meaning.

So for me there’s confusion on weather the user is allowed to have spaces in BricksBuilder(if not, it should error handle this), or it’ll break something, or weather that’s a bug that needs to be fixed.

Aaaah, now I see what you mean and have created a task.

In your screenshot, it appears that you intended to add a space at the beginning, which would make no sense—that’s why I asked.

1 Like

Yeah, I thought so :smiley:

But even if the user wants to add a space in front, they should be allowed to do so - and you would just trim the white space anyway.

We’ve fixed this issue in Bricks 2.0, now available as a one-click update in your WordPress Dashboard.

Please take your time to read the changelog entry before updating: Bricks 2.0 Changelog – Bricks, and let us know if you continue to experience issues.