Foundation-sites: Cannot type spaces into input within dropdown menu

Created on 26 Jan 2016  路  8Comments  路  Source: foundation/foundation-sites

When placing an input within the top-bar element you can no longer type spaces into it.

For example: "hello world" is not possible, instead it would format as "helloworld"

Using latest version of Foundation 6.

javascript 馃悰bug

Most helpful comment

I found two workarounds for this:
Disable keydown events on li.menu-text:
$('li.menu-text').off('keydown');
Or disable foundation keyboard events completely:
Foundation.Keyboard.handleKey = function(){};

All 8 comments

Can't recreate with a basic top bar example鈥攃an you post the HTML you're using?

Managed to recreate it fine using this F6 codepen as you can see on this post

http://foundation.zurb.com/forum/posts/37908-input-inside-top-bar-doesnt-allow-spaces

Ah okay, this is actually happening from am <input> being inside a dropdown menu, not a top bar. (Top bar has no JavaScript.)

I think this is happening because the dropdown menu uses the space bar to handle manipulating the menu.

I found two workarounds for this:
Disable keydown events on li.menu-text:
$('li.menu-text').off('keydown');
Or disable foundation keyboard events completely:
Foundation.Keyboard.handleKey = function(){};

This issue was caused by the keyboard navigation part of the Dropdown Menu. It should be fixed by now as shown in this pen I updated to Foundation 6.2.3.

Does this fix come after the tag v6.2.3? I'm still seeing the issue in the latest dist/foundation.min.js.

Does it still occur in the Pen I linked above for you? It is using version 6.2.3 and it works for me there.

Oops, nevermind. It is indeed definitely working in 6.2.3. My bad!

Was this page helpful?
0 / 5 - 0 ratings