On my chat app, I have a contact list, and when you click on a contact, it opens a drop down menu on the left of the contact (something like http://screencast.com/t/uM643uwd69CB), but with overflow auto on the contact list, it doesnt appear.
HTML looks like
<ul id="contact-list">
<li ng-repeat="contact in contacts | orderBy: '-isOnline': false" ng-controller="contactItemController" ng-dblclick="chatWithUser(contact)" ng-click="contactItemClick($event)">
</div>
<div class="name">{{ contact.username }}</div>
<ul ng-hide="popoverHide" class="contact-dropdown">
<button ng-click="chatWithUser(contact)" ng-disabled="!isChatAvailableForTheContact(contact)">{{ !contact.isOnline ? 'Leave a' : 'Instant' }} Message</button>
</ul>
</li>
</ul>
CSS looks like
#contact-list {
width: 100%;
padding: 0;
margin: 0;
/*overflow: auto;*/
}
#contact-list li {
list-style: none;
position: relative;
}
#contact-list li .contact-dropdown {
z-index: 10;
position: absolute;
top: 0;
left: 0;
margin-left: -150px;
}
#contact-list li .contact-dropdown button {
width: 100%;
color: #0077CC;
background: none;
border: none;
cursor: pointer;
}
#contact-list li .contact-dropdown button:disabled {
color: gray;
}
When overflow-y: auto;
is set in #contacts-list
, then the pop-over menu will not pop when clicking on a list item. However when it's not set, the pop over menu pops. Any idea?