From db85fb5a1a000744fad83a0e0cdd82f9de6c078f Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 29 Jan 2016 13:18:42 +0100 Subject: [PATCH] As fallback use hovered element to select on enter. --- app/assets/javascripts/app/lib/base/jquery.textmodule.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/assets/javascripts/app/lib/base/jquery.textmodule.js b/app/assets/javascripts/app/lib/base/jquery.textmodule.js index 9a3f876f4..44b33c774 100644 --- a/app/assets/javascripts/app/lib/base/jquery.textmodule.js +++ b/app/assets/javascripts/app/lib/base/jquery.textmodule.js @@ -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 }