# Automatically hide option buttons in list

**URL:** <https://forum.ionicframework.com/t/automatically-hide-option-buttons-in-list/5174>\
**Category:** ionic-v1\
**Created:** [June 4, 2014, 6:45am UTC](https://forum.ionicframework.com/t/automatically-hide-option-buttons-in-list/5174 "2014-06-04T06:45:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marbetschar](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@marbetschar](https://forum.ionicframework.com/u/marbetschar)\
**Post date:** [June 4, 2014, 6:45am UTC](https://forum.ionicframework.com/t/automatically-hide-option-buttons-in-list/5174/1 "2014-06-04T06:45:01Z")

</div>

The behaviour of native apps on iOS in terms of options in a list ist, that they are hidden automatically as soon as I click somewhere else than on the list item.

That auto-hide-feature currently does not work in the nightly build of ionic.  
Is it possible to add this so I do not have to hide the option buttons by hand?

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [June 4, 2014, 8:17pm UTC](https://forum.ionicframework.com/t/automatically-hide-option-buttons-in-list/5174/2 "2014-06-04T20:17:39Z")

</div>

You could achieve this with a directive.

```
.directive('closeOption', function($ionicGesture, $ionicListDelegate) {
  return {
    restrict : 'A',

    link : function(scope, elem, attrs) {
     $ionicGesture.on('touch', function(e){
       $ionicListDelegate.closeOptionButtons();
     }, elem);

    }
  }
})

```

> **[List: Close on scroll](https://codepen.io/mhartington/pen/gzrvL)**
>
> An Ionic list directive Forked from \[Ionic\](/ionic)'s Pen \[List: 1.0.0-beta.6\](/ionic/pen/JsHjf/)....

---

<div class="post-metadata">

**Author:** ![ameralhomsi](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@ameralhomsi](https://forum.ionicframework.com/u/ameralhomsi)\
**Post date:** [October 22, 2016, 3:08pm UTC](https://forum.ionicframework.com/t/automatically-hide-option-buttons-in-list/5174/3 "2016-10-22T15:08:58Z")

</div>

Thanks for this code, but the option buttons should hide by single click without navigate to other view (according to href of ion-item), and the second click should be navigated
