summaryrefslogtreecommitdiffstats
path: root/tools/Sandcastle/Presentation/vs2005/Scripts/Dropdown.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/Sandcastle/Presentation/vs2005/Scripts/Dropdown.js')
-rw-r--r--tools/Sandcastle/Presentation/vs2005/Scripts/Dropdown.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/Sandcastle/Presentation/vs2005/Scripts/Dropdown.js b/tools/Sandcastle/Presentation/vs2005/Scripts/Dropdown.js
index 34872b7..c52203d 100644
--- a/tools/Sandcastle/Presentation/vs2005/Scripts/Dropdown.js
+++ b/tools/Sandcastle/Presentation/vs2005/Scripts/Dropdown.js
@@ -1,11 +1,12 @@
// Dropdown menu control
-function Dropdown(activatorId, dropdownId) {
+function Dropdown(activatorId, dropdownId, containerId) {
// store activator and dropdown elements
this.activator = document.getElementById(activatorId);
this.dropdown = document.getElementById(dropdownId);
+ this.container = document.getElementById(containerId);
this.activatorImage = document.getElementById(activatorId + "Image");
// wire up show/hide events
@@ -53,7 +54,7 @@ Dropdown.prototype.reposition = function(e) {
var offsetTop = 0;
var offsetElement = this.activator;
- while (offsetElement) {
+ while (offsetElement && offsetElement != this.container) {
offsetLeft += offsetElement.offsetLeft;
offsetTop += offsetElement.offsetTop;
offsetElement = offsetElement.offsetParent;