Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

mdc-text-field in mdc-menu doesn't accept spaces #2471

Closed
QJan84 opened this issue Mar 27, 2018 · 3 comments
Closed

mdc-text-field in mdc-menu doesn't accept spaces #2471

QJan84 opened this issue Mar 27, 2018 · 3 comments

Comments

@QJan84
Copy link

QJan84 commented Mar 27, 2018

See #2422 (closed)

I have the same problem.
I have an input (free user input) in a MDCSelect menu and can also enter here no space.


select-input-1

select-input-2

@williamernest
Copy link
Contributor

@QJan84 The material menu is not designed to contain input elements. It's designed to allow you to make a single selection from a list. We disable the space key event to prevent inadvertent scrolling of the page while interacting with the menu.

@al-pt-old
Copy link

Ohh... Guys...

@acdvorak
Copy link
Contributor

acdvorak commented Apr 2, 2018

Thanks for filing this issue!

Sadly this is not a use case we can support right now 😢

The problem is that the current menu component assumes it only contains list items, which are selected with the Space key. So it needs to prevent the browser's default behavior of scrolling the page when the Space key is pressed in order to improve UX.

We would love to find a way to allow clients to customize that behavior, but doing so would require a substantial rewrite of the menu component, and unfortunately we don't have the resources to do that right now.

(FYI, the "select" component was simplified to use a native <select> element in #2462.)

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

No branches or pull requests

4 participants