Permalink
Browse files

feat(dropdowns): Allow space and cursor down to trigger opening of me…

…nus (#1159)

* feat(dropdown): Trigger menu open on space and cusor down

* [nav-item] Allow cursor down to trigger open of dropdown
  • Loading branch information...
tmorehouse committed Oct 4, 2017
1 parent 7a62b75 commit 1249f51c05769c5d6f661f9a7c0efd401f5f4d3a
Showing with 3 additions and 0 deletions.
  1. +2 −0 lib/components/dropdown.vue
  2. +1 −0 lib/components/nav-item-dropdown.vue
@@ -23,6 +23,8 @@
:size="size"
:disabled="disabled"
@click.stop.prevent="toggle"
@keydown.prevent.space="toggle"
@keydown.prevent.down="toggle"
>
<span v-if="split" class="sr-only">{{toggleText}}</span>
<slot v-else name="button-content"><slot name="text">{{text}}</slot></slot>
@@ -11,6 +11,7 @@
@click.stop.prevent="toggle"
@keydown.enter.stop.prevent="toggle"
@keydown.space.stop.prevent="toggle"
@keydown.down.prevent="toggle"
>
<slot name="button-content"><slot name="text"><span v-html="text"></span></slot></slot>
</a>

0 comments on commit 1249f51

Please sign in to comment.