Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(mdMenu): fix positioning breaking after scroll/resize
Browse files Browse the repository at this point in the history
closes #3204, references #3218
  • Loading branch information
rschmukler committed Jun 11, 2015
1 parent 2513153 commit 94b03b0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/menu/menu-interim-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function MenuProvider($$interimElementProvider) {
themable: true
};

/**
/**
* Boilerplate interimElement onShow function
* Handles inserting the menu into the DOM, positioning it, and wiring up
* various interaction events
Expand Down Expand Up @@ -244,6 +244,7 @@ function MenuProvider($$interimElementProvider) {
* @param {object} opts - the interim element options object
*/
function positionMenu(el, opts) {
debugger;
if (opts.isRemoved) return;

var containerNode = el[0],
Expand Down Expand Up @@ -274,8 +275,8 @@ function MenuProvider($$interimElementProvider) {
alignTargetRect = alignTarget.getBoundingClientRect();

existingOffsets = {
top: containerNode.style.top,
left: containerNode.style.left
top: parseFloat(containerNode.style.top || 0),
left: parseFloat(containerNode.style.left || 0)
};
}

Expand Down

0 comments on commit 94b03b0

Please sign in to comment.