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

Commit 29cf32b

Browse files
ThomasBurlesonRobert Messerle
authored andcommitted
fix(dialog, menu, select, interimElement): use $animateCss instead of transitionEnd events.
replace programmatic use of element.css for style changes and use of transitionEnd event listeners with use of ngAnimate's $animateCss; use polyfill for Angular <1.4. $mdUtil.dom.animator.translate3d() uses $animateCss() instead of waitTransitionEnd() use animateCss.js polyfill for 'material.animate' module - add mock `createMockStyleSheet` for animateCss tests refactors to menu-interim-element.js and select.js - refactor logic and patterns used - use $animateCss in place of waitTransitionEnd() debounce Select and Menu window resize handlers Dialog uses same showBackdrop/hideBackdrop pattern as Menu and Select select async demo no longer clears users list when reloading select demos use `md-input-container { margin-right: 10px;}` hide Select Backdrop with zero duration enable full click detection in select-value area by using background color (with zero alpa). BREAKING-CHANGES: select and backdrop styles added * select list text is not selectable, * select backdrop hide duration is 0ms * select text value background has zero alpha ```scss .md-text { @include not-selectable(); } .md-select-value { background-color: rgba(0,0,0,0); } md-backdrop { &.md-select-backdrop { transition-duration: 0ms; } } ``` Fixes #3919. Fixes #3837. Fixes #3773, Fixes #3640. Fixes #3527. Fixes #3653.
1 parent c63e859 commit 29cf32b

File tree

19 files changed

+1756
-625
lines changed

19 files changed

+1756
-625
lines changed

src/components/backdrop/backdrop.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ md-backdrop {
55
}
66
&.md-select-backdrop {
77
z-index: $z-index-dialog + 1;
8+
transition-duration: 0ms;
89
}
910
&.md-dialog-backdrop {
1011
z-index: $z-index-dialog - 1;

src/components/dialog/dialog.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,6 @@ function MdDialogProvider($$interimElementProvider) {
530530
// In case the user provides a raw dom element, always wrap it in jqLite
531531
options.parent = angular.element(options.parent || $rootElement);
532532

533-
if (options.disableParentScroll) {
534-
options.restoreScroll = $mdUtil.disableScrollAround(element,options.parent);
535-
}
536533
}
537534

538535
/**
@@ -610,6 +607,10 @@ function MdDialogProvider($$interimElementProvider) {
610607
$animate.enter(options.backdrop, options.parent);
611608
}
612609

610+
if (options.disableParentScroll) {
611+
options.restoreScroll = $mdUtil.disableScrollAround(element,options.parent);
612+
}
613+
613614
/**
614615
* Hide modal backdrop element...
615616
*/
@@ -619,9 +620,10 @@ function MdDialogProvider($$interimElementProvider) {
619620
}
620621
if (options.disableParentScroll) {
621622
options.restoreScroll();
623+
delete options.restoreScroll;
622624
}
623625

624-
options.hideBackdrop = null;
626+
delete options.hideBackdrop;
625627
}
626628
}
627629

0 commit comments

Comments
 (0)