As fallback use hovered element to select on enter.

This commit is contained in:
Martin Edenhofer 2016-01-29 13:18:42 +01:00
parent 5d8b109a7e
commit db85fb5a1a

View file

@ -53,6 +53,11 @@
if ( e.keyCode === 13 ) {
e.preventDefault()
var id = _this.$widget.find('.dropdown-menu li.active a').data('id')
// as fallback use hovered element
if (!id) {
id = _this.$widget.find('.dropdown-menu li:hover a').data('id')
}
_this.take(id)
return
}