From: Michael M Slusarz Date: Wed, 12 May 2010 17:13:27 +0000 (-0600) Subject: Can't set domParent in default list - this breaks every KNL that is not attached... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e6395c885c61c78270ea7763c32b0f1689f50095;p=horde.git Can't set domParent in default list - this breaks every KNL that is not attached to a body element --- diff --git a/horde/js/KeyNavList.js b/horde/js/KeyNavList.js index 149a5a6cb..ea6d71011 100644 --- a/horde/js/KeyNavList.js +++ b/horde/js/KeyNavList.js @@ -47,12 +47,18 @@ var KeyNavList = Class.create({ onChoose: Prototype.emptyFunction, onHide: Prototype.emptyFunction, onShow: Prototype.emptyFunction, - domParent: document.body, + domParent: null, keydownObserver: document }, opts || {}); this.div = new Element('DIV', { className: 'KeyNavList' }).hide().insert(new Element('UL')); - this.opts.domParent.appendChild(this.div); + + if (!this.opts.domParent) { + this.opts.domParent = document.body; + } + this.opts.domParent = $(this.opts.domParent); + + this.opts.domParent.insert(this.div); if (this.opts.list) { this.update(this.opts.list);