| define(['menu', 'hint/item', 'hint/prefix'], function (menuClass, itemClass, prefixClass) { |
| * Create new hint helper menu. |
| create : function (hint, context, params) { |
| var obj = Object.create(menuClass) |
| ._init(itemClass, prefixClass, params); |
| obj._element.classList.add('hint'); |
| // Make the top item always active |
| // This is only domspecific |
| obj.element().addEventListener('blur', function (e) { |
| // Focus on input field on hide |
| obj.onHide = function () { |
| var input = this._hint.inputField(); |
| input.container().classList.remove('active'); |
| * The hint helper object, |
| * the menu is attached to. |