Skip to content
This repository was archived by the owner on May 28, 2022. It is now read-only.

Commit b974150

Browse files
committed
Add comment and remove unnecessary body default.
1 parent 20448a6 commit b974150

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

select-component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ function register(module) {
3535
module.config(function($provide) {
3636
/* @ngInject */
3737
$provide.decorator('$mdSelect', function($delegate) {
38+
// enable md-select to work in dialogs by making the default parent
39+
// use the deepest dialog if present
3840
var show = $delegate.show;
3941
$delegate.show = function(options) {
4042
options = options || {};
4143
if(!('parent' in options)) {
4244
var dialog = angular.element('dialog:not(:has(dialog))');
4345
if(dialog[0]) {
4446
options.parent = 'dialog';
45-
} else {
46-
options.parent = 'body';
4747
}
4848
}
4949
return show.call($delegate, options);

0 commit comments

Comments
 (0)