From e6395c885c61c78270ea7763c32b0f1689f50095 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 12 May 2010 11:13:27 -0600 Subject: [PATCH] Can't set domParent in default list - this breaks every KNL that is not attached to a body element --- horde/js/KeyNavList.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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); -- 2.11.0