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

Commit b6d6a60

Browse files
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 af05235 commit b6d6a60

File tree

19 files changed

+1756
-624
lines changed

19 files changed

+1756
-624
lines changed

src/components/backdrop/backdrop.scss

+1
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

+5-3
Original file line numberDiff line numberDiff line change
@@ -534,9 +534,6 @@ function MdDialogProvider($$interimElementProvider) {
534534
// In case the user provides a raw dom element, always wrap it in jqLite
535535
options.parent = angular.element(options.parent || $rootElement);
536536

537-
if (options.disableParentScroll) {
538-
options.restoreScroll = $mdUtil.disableScrollAround(element, options.parent);
539-
}
540537
}
541538

542539
/**
@@ -613,6 +610,10 @@ function MdDialogProvider($$interimElementProvider) {
613610
$animate.enter(options.backdrop, options.parent);
614611
}
615612

613+
if (options.disableParentScroll) {
614+
options.restoreScroll = $mdUtil.disableScrollAround(element, options.parent);
615+
}
616+
616617
/**
617618
* Hide modal backdrop element...
618619
*/
@@ -622,6 +623,7 @@ function MdDialogProvider($$interimElementProvider) {
622623
}
623624
if (options.disableParentScroll) {
624625
options.restoreScroll();
626+
delete options.restoreScroll;
625627
}
626628

627629
options.hideBackdrop = null;

0 commit comments

Comments
 (0)