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

Commit

Permalink
fix(autocomplete): two specs leak the scroll mask element (#9568)
Browse files Browse the repository at this point in the history
* chore(panel): fix failing unit test

When running the panel tests separately from all the others, the one about disabling scrolling was failing. This wasn't happening when running it together with all the other components, because some other component (not sure exactly which one, but it seemed like either dialog or autocomplete) wasn't cleaning up the DOM properly and was leaving a scroll mask lying around.

This change removes the DOM lookup for the scroll mask, because it looks like it got disabled in PR #8901, however the test didn't get updated.

* fix(autocomplete): two specs leak the scroll mask element

* The scroll mask was not removed by two specs of the autocomplete and could cause unexpected issues in other suites, when setting focus on those.
  • Loading branch information
devversion authored and ThomasBurleson committed Sep 10, 2016
1 parent 857d3b8 commit a95d76d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/autocomplete/autocomplete.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ describe('<md-autocomplete>', function() {
}));

it('removes the md-scroll-mask on cleanup', inject(function($mdUtil, $timeout, $material) {
spyOn($mdUtil, 'enableScrolling');
spyOn($mdUtil, 'enableScrolling').and.callThrough();

var scope = createScope();
var template =
Expand Down Expand Up @@ -957,7 +957,7 @@ describe('<md-autocomplete>', function() {
}));

it('removes the md-scroll-mask when md-autocomplete removed on change', inject(function($mdUtil, $timeout, $material) {
spyOn($mdUtil, 'enableScrolling');
spyOn($mdUtil, 'enableScrolling').and.callThrough();

var scope = createScope();
var template =
Expand Down

0 comments on commit a95d76d

Please sign in to comment.