Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix(mdUtil): move comment nodes as well when disabling scroll
Browse files Browse the repository at this point in the history
As comment nodes were not moved by disableScrollAround(), Angular could
misplace a few elements because of a forgotten comment node that points
to a directive.

Fixes #2456
  • Loading branch information
Gustavo Henke authored and rschmukler committed Apr 27, 2015
1 parent 4a648d5 commit 160df4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/util/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ angular.module('material.core')
var disableStyle = $window.getComputedStyle(disableTarget[0]);
var wrapperEl = angular.element('<div class="md-virtual-scroll-container"><div class="md-virtual-scroller"></div></div>');
var virtualScroller = wrapperEl.children().eq(0);
virtualScroller.append(disableTarget.children());
virtualScroller.append(disableTarget[0].childNodes);
disableTarget.append(wrapperEl);
var originalScrollBarShow = originalWidth < scrollEl.clientWidth;

Expand Down

0 comments on commit 160df4c

Please sign in to comment.