From efc1f794ab01fa283c608e048c13e8e7a68bbee2 Mon Sep 17 00:00:00 2001 From: "martijn.martijn@gmail.com" Date: Fri, 12 Oct 2007 03:24:00 -0700 Subject: [PATCH] Bug 399316 - Bug introduced with patch for bug 216434 (autocomplete dropdown covers textbox when textbox is near bottom of screen), r=neil, a=mconnor --- toolkit/content/widgets/autocomplete.xml | 5 +++-- .../autocomplete/resources/content/autocomplete.xml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/toolkit/content/widgets/autocomplete.xml b/toolkit/content/widgets/autocomplete.xml index ee456ad79e5e..1eb5e54090af 100644 --- a/toolkit/content/widgets/autocomplete.xml +++ b/toolkit/content/widgets/autocomplete.xml @@ -524,7 +524,7 @@ - + @@ -584,7 +584,8 @@ document.popupNode = null; var rect = aElement.getBoundingClientRect(); - this.setAttribute("width", rect.right - rect.left); + var width = rect.right - rect.left; + this.setAttribute("width", width > 100 ? width : 100); this.openPopup(aElement, "after_start", 0, 0, false, false); this.popupBoxObject.setConsumeRollupEvent(this.mInput.consumeRollupEvent); diff --git a/xpfe/components/autocomplete/resources/content/autocomplete.xml b/xpfe/components/autocomplete/resources/content/autocomplete.xml index 0e9667b7f6b4..4f272d1f62de 100644 --- a/xpfe/components/autocomplete/resources/content/autocomplete.xml +++ b/xpfe/components/autocomplete/resources/content/autocomplete.xml @@ -1405,7 +1405,7 @@ - + @@ -1575,7 +1575,8 @@ this.invalidate(); var rect = aElement.getBoundingClientRect(); - this.setAttribute("width", rect.right - rect.left); + var width = rect.right - rect.left; + this.setAttribute("width", width > 100 ? width : 100); this.openPopup(aElement, "after_start", 0, 0, false, false); this.popupBoxObject.setConsumeRollupEvent(aInput.consumeRollupEvent);