---
schema_version: "1"
id: 08bc6eadcf09fb1a6b44be587ad55cd0e6cb4714c270eafb3d7873427abb883f
title: Menu Focus Change (Deprecated)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/lightning-base-components/lightning-design-system/guides/aura/components/ui/menuFocusChange/ui-menu-focus-change.md
canonical_url: https://developer.salesforce.com/docs/platform/lightning-component-reference/guide/ui-menu-focus-change.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a3c13ab4e80b0829f65aa209f09a21a38461def1e21fe52ab06a36b7f0694caf
products:
  - Lightning Component Reference
---
# Menu Focus Change (Deprecated)

**`ui:menuFocusChange`**

Deprecated as of API version 47.0. Use [`lightning:buttonMenu`](/docs/platform/lightning-component-reference/guide/aura-button-menu.html) instead.

::::::tabset{tabs='[ "Develop", "Specifications"]'}

:::::tab

This event is fired when you scroll up and down the `ui:menuList` component, which triggers a focus change in menu items. To set a handler for the `ui:menuFocusChange` event, use the `menuFocusChange` attribute on `ui:menuList`.

The following example shows a menu with two list items. The `handleChange` client-side controller handles the `ui:menuFocusChange` event.

```xml
<aura:component>
  <ui:menu>
    <ui:menuTriggerLink aura:id="trigger" label="Contacts" />
    <ui:menuList class="actionMenu" aura:id="actionMenu" menuFocusChange="{!c.handleChange}">
      <ui:actionMenuItem aura:id="item1" label="All Contacts" />
      <ui:actionMenuItem aura:id="item2" label="All Primary" />
    </ui:menuList>
  </ui:menu>
</aura:component>
```

If you're using this event with a component other than `ui:menuList`, register the event first.

```xml
<aura:registerEvent
  name="menuFocusChange"
  type="ui:menuFocusChange"
  description="The event fired when the menu list focus changes from one menu item to another."
/>
```


:::::

:::::tab
## Attributes

| Name           | Description                              | Type        | Default | Required |
| -------------- | ---------------------------------------- | ----------- | ------- | -------- |
| `currentItem`  | The menu item that's currently focused.  | component[] |         |          |
| `previousItem` | The menu item that's previously focused. | component[] |         |          |

:::::

::::::
