@angular/cdk 12.1.0 → 12.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/index.metadata.json +1 -1
- package/a11y/input-modality/input-modality-detector.d.ts +0 -2
- package/bundles/cdk-a11y.umd.js +11 -16
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +59 -40
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +6 -6
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.js +7 -0
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +3 -3
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +11 -7
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-table.umd.js +25 -9
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.js +2 -1
- package/bundles/cdk-testing-protractor.umd.js.map +1 -1
- package/bundles/cdk-testing-selenium-webdriver.umd.js +2 -1
- package/bundles/cdk-testing-selenium-webdriver.umd.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.js +4 -2
- package/bundles/cdk-testing-testbed.umd.js.map +1 -1
- package/bundles/cdk-testing.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.js +3 -5
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk.umd.js +1 -1
- package/bundles/cdk.umd.js.map +1 -1
- package/drag-drop/drag-styling.d.ts +5 -10
- package/drag-drop/index.metadata.json +1 -1
- package/drag-drop/parent-position-tracker.d.ts +0 -2
- package/esm2015/a11y/fake-event-detection.js +7 -6
- package/esm2015/a11y/focus-monitor/focus-monitor.js +5 -5
- package/esm2015/a11y/focus-trap/configurable-focus-trap.js +1 -1
- package/esm2015/a11y/input-modality/input-modality-detector.js +5 -11
- package/esm2015/a11y/key-manager/activedescendant-key-manager.js +1 -1
- package/esm2015/a11y/key-manager/focus-key-manager.js +1 -1
- package/esm2015/drag-drop/drag-ref.js +30 -18
- package/esm2015/drag-drop/drag-styling.js +29 -17
- package/esm2015/drag-drop/parent-position-tracker.js +3 -6
- package/esm2015/overlay/dispatchers/overlay-keyboard-dispatcher.js +1 -1
- package/esm2015/overlay/dispatchers/overlay-outside-click-dispatcher.js +3 -4
- package/esm2015/overlay/fullscreen-overlay-container.js +1 -1
- package/esm2015/overlay/overlay-container.js +6 -5
- package/esm2015/platform/features/shadow-dom.js +7 -1
- package/esm2015/portal/dom-portal-outlet.js +1 -1
- package/esm2015/portal/portal-directives.js +1 -1
- package/esm2015/portal/portal.js +1 -1
- package/esm2015/scrolling/viewport-ruler.js +4 -4
- package/esm2015/scrolling/virtual-scroll-viewport.js +1 -1
- package/esm2015/stepper/stepper.js +9 -4
- package/esm2015/table/cell.js +16 -4
- package/esm2015/table/row.js +1 -1
- package/esm2015/table/table.js +2 -2
- package/esm2015/testing/protractor/protractor-element.js +3 -2
- package/esm2015/testing/selenium-webdriver/selenium-web-driver-element.js +3 -2
- package/esm2015/testing/test-element.js +1 -1
- package/esm2015/testing/testbed/fake-events/event-objects.js +5 -3
- package/esm2015/testing/testbed/unit-test-element.js +1 -1
- package/esm2015/tree/control/flat-tree-control.js +1 -1
- package/esm2015/tree/control/nested-tree-control.js +1 -1
- package/esm2015/tree/nested-node.js +4 -6
- package/esm2015/version.js +1 -1
- package/fesm2015/a11y.js +12 -17
- package/fesm2015/a11y.js.map +1 -1
- package/fesm2015/cdk.js +1 -1
- package/fesm2015/cdk.js.map +1 -1
- package/fesm2015/drag-drop.js +57 -37
- package/fesm2015/drag-drop.js.map +1 -1
- package/fesm2015/overlay.js +7 -7
- package/fesm2015/overlay.js.map +1 -1
- package/fesm2015/platform.js +7 -1
- package/fesm2015/platform.js.map +1 -1
- package/fesm2015/portal.js.map +1 -1
- package/fesm2015/scrolling.js +3 -3
- package/fesm2015/scrolling.js.map +1 -1
- package/fesm2015/stepper.js +8 -3
- package/fesm2015/stepper.js.map +1 -1
- package/fesm2015/table.js +15 -3
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/testing/protractor.js +2 -1
- package/fesm2015/testing/protractor.js.map +1 -1
- package/fesm2015/testing/selenium-webdriver.js +2 -1
- package/fesm2015/testing/selenium-webdriver.js.map +1 -1
- package/fesm2015/testing/testbed.js +4 -2
- package/fesm2015/testing/testbed.js.map +1 -1
- package/fesm2015/testing.js.map +1 -1
- package/fesm2015/tree.js +3 -5
- package/fesm2015/tree.js.map +1 -1
- package/overlay/index.metadata.json +1 -1
- package/package.json +1 -1
- package/platform/features/shadow-dom.d.ts +2 -0
- package/platform/index.metadata.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-add/package-config.js +5 -2
- package/schematics/ng-add/package-config.mjs +5 -2
- package/schematics/ng-update/devkit-migration-rule.js +1 -1
- package/schematics/ng-update/devkit-migration-rule.mjs +1 -1
- package/schematics/ng-update/find-stylesheets.js +2 -2
- package/schematics/ng-update/find-stylesheets.mjs +2 -2
- package/schematics/ng-update/html-parsing/elements.d.ts +2 -1
- package/schematics/ng-update/html-parsing/elements.js +6 -4
- package/schematics/ng-update/html-parsing/elements.mjs +6 -4
- package/schematics/ng-update/migrations/attribute-selectors.d.ts +3 -2
- package/schematics/ng-update/migrations/attribute-selectors.js +1 -1
- package/schematics/ng-update/migrations/attribute-selectors.mjs +1 -1
- package/schematics/ng-update/migrations/class-inheritance.js +1 -1
- package/schematics/ng-update/migrations/class-inheritance.mjs +1 -1
- package/schematics/ng-update/migrations/class-names.js +1 -1
- package/schematics/ng-update/migrations/class-names.mjs +1 -1
- package/schematics/ng-update/migrations/constructor-signature.js +1 -1
- package/schematics/ng-update/migrations/constructor-signature.mjs +1 -1
- package/schematics/ng-update/migrations/css-selectors.js +1 -1
- package/schematics/ng-update/migrations/css-selectors.mjs +1 -1
- package/schematics/ng-update/migrations/element-selectors.d.ts +3 -2
- package/schematics/ng-update/migrations/element-selectors.js +1 -1
- package/schematics/ng-update/migrations/element-selectors.mjs +1 -1
- package/schematics/ng-update/migrations/input-names.js +1 -1
- package/schematics/ng-update/migrations/input-names.mjs +1 -1
- package/schematics/ng-update/migrations/method-call-arguments.js +1 -1
- package/schematics/ng-update/migrations/method-call-arguments.mjs +1 -1
- package/schematics/ng-update/migrations/misc-template.js +1 -1
- package/schematics/ng-update/migrations/misc-template.mjs +1 -1
- package/schematics/ng-update/migrations/output-names.js +1 -1
- package/schematics/ng-update/migrations/output-names.mjs +1 -1
- package/schematics/ng-update/migrations/property-names.js +1 -1
- package/schematics/ng-update/migrations/property-names.mjs +1 -1
- package/schematics/ng-update/typescript/base-types.js +2 -2
- package/schematics/ng-update/typescript/base-types.mjs +2 -2
- package/schematics/tsconfig.json +6 -0
- package/schematics/update-tool/migration.d.ts +2 -2
- package/schematics/update-tool/migration.js +1 -1
- package/schematics/update-tool/migration.mjs +1 -1
- package/schematics/utils/build-component.js +7 -4
- package/schematics/utils/build-component.mjs +7 -4
- package/schematics/utils/html-manipulation.d.ts +2 -2
- package/schematics/utils/html-manipulation.js +1 -1
- package/schematics/utils/html-manipulation.mjs +1 -1
- package/schematics/utils/parse5-element.d.ts +2 -2
- package/schematics/utils/parse5-element.js +2 -2
- package/schematics/utils/parse5-element.mjs +2 -2
- package/schematics/utils/schematic-options.d.ts +2 -6
- package/schematics/utils/schematic-options.js +3 -2
- package/schematics/utils/schematic-options.mjs +3 -2
- package/schematics/utils/vendored-ast-utils/index.js +8 -7
- package/schematics/utils/vendored-ast-utils/index.mjs +8 -7
- package/scrolling/index.metadata.json +1 -1
- package/stepper/index.metadata.json +1 -1
- package/stepper/stepper.d.ts +6 -2
- package/table/index.metadata.json +1 -1
- package/testing/protractor/protractor-element.d.ts +1 -1
- package/testing/selenium-webdriver/selenium-web-driver-element.d.ts +1 -1
- package/testing/test-element.d.ts +1 -1
- package/testing/testbed/unit-test-element.d.ts +1 -1
- package/tree/index.metadata.json +1 -1
- package/tree/nested-node.d.ts +1 -3
package/fesm2015/cdk.js
CHANGED
|
@@ -8,7 +8,7 @@ import { Version } from '@angular/core';
|
|
|
8
8
|
* found in the LICENSE file at https://angular.io/license
|
|
9
9
|
*/
|
|
10
10
|
/** Current version of the Angular Component Development Kit. */
|
|
11
|
-
const VERSION = new Version('12.1.
|
|
11
|
+
const VERSION = new Version('12.1.4');
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
package/fesm2015/cdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk.js","sources":["../../../../../../src/cdk/version.ts","../../../../../../src/cdk/public-api.ts","../../../../../../src/cdk/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('12.1.
|
|
1
|
+
{"version":3,"file":"cdk.js","sources":["../../../../../../src/cdk/version.ts","../../../../../../src/cdk/public-api.ts","../../../../../../src/cdk/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('12.1.4');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './version';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;;AAUA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;ACXtD;;;;;;;;ACAA;;;;;;;;;;"}
|
package/fesm2015/drag-drop.js
CHANGED
|
@@ -4,8 +4,9 @@ import * as i1 from '@angular/common';
|
|
|
4
4
|
import { DOCUMENT } from '@angular/common';
|
|
5
5
|
import * as i2 from '@angular/cdk/scrolling';
|
|
6
6
|
import { ViewportRuler, ScrollDispatcher, CdkScrollableModule } from '@angular/cdk/scrolling';
|
|
7
|
-
import { normalizePassiveListenerOptions, _getShadowRoot } from '@angular/cdk/platform';
|
|
7
|
+
import { _getEventTarget, normalizePassiveListenerOptions, _getShadowRoot } from '@angular/cdk/platform';
|
|
8
8
|
import { coerceBooleanProperty, coerceElement, coerceArray, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
9
|
+
import { isFakeTouchstartFromScreenReader, isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';
|
|
9
10
|
import { Subject, Subscription, interval, animationFrameScheduler, Observable, merge } from 'rxjs';
|
|
10
11
|
import { takeUntil, startWith, map, take, tap, switchMap } from 'rxjs/operators';
|
|
11
12
|
import { Directionality } from '@angular/cdk/bidi';
|
|
@@ -18,13 +19,20 @@ import { Directionality } from '@angular/cdk/bidi';
|
|
|
18
19
|
* found in the LICENSE file at https://angular.io/license
|
|
19
20
|
*/
|
|
20
21
|
/**
|
|
21
|
-
* Shallow-extends a stylesheet object with another stylesheet object.
|
|
22
|
+
* Shallow-extends a stylesheet object with another stylesheet-like object.
|
|
23
|
+
* Note that the keys in `source` have to be dash-cased.
|
|
22
24
|
* @docs-private
|
|
23
25
|
*/
|
|
24
|
-
function extendStyles(dest, source) {
|
|
26
|
+
function extendStyles(dest, source, importantProperties) {
|
|
25
27
|
for (let key in source) {
|
|
26
28
|
if (source.hasOwnProperty(key)) {
|
|
27
|
-
|
|
29
|
+
const value = source[key];
|
|
30
|
+
if (value) {
|
|
31
|
+
dest.setProperty(key, value, (importantProperties === null || importantProperties === void 0 ? void 0 : importantProperties.has(key)) ? 'important' : '');
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
dest.removeProperty(key);
|
|
35
|
+
}
|
|
28
36
|
}
|
|
29
37
|
}
|
|
30
38
|
return dest;
|
|
@@ -38,33 +46,38 @@ function extendStyles(dest, source) {
|
|
|
38
46
|
function toggleNativeDragInteractions(element, enable) {
|
|
39
47
|
const userSelect = enable ? '' : 'none';
|
|
40
48
|
extendStyles(element.style, {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
'touch-action': enable ? '' : 'none',
|
|
50
|
+
'-webkit-user-drag': enable ? '' : 'none',
|
|
51
|
+
'-webkit-tap-highlight-color': enable ? '' : 'transparent',
|
|
52
|
+
'user-select': userSelect,
|
|
53
|
+
'-ms-user-select': userSelect,
|
|
54
|
+
'-webkit-user-select': userSelect,
|
|
55
|
+
'-moz-user-select': userSelect
|
|
48
56
|
});
|
|
49
57
|
}
|
|
50
58
|
/**
|
|
51
59
|
* Toggles whether an element is visible while preserving its dimensions.
|
|
52
60
|
* @param element Element whose visibility to toggle
|
|
53
61
|
* @param enable Whether the element should be visible.
|
|
62
|
+
* @param importantProperties Properties to be set as `!important`.
|
|
54
63
|
* @docs-private
|
|
55
64
|
*/
|
|
56
|
-
function toggleVisibility(element, enable) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
65
|
+
function toggleVisibility(element, enable, importantProperties) {
|
|
66
|
+
extendStyles(element.style, {
|
|
67
|
+
position: enable ? '' : 'fixed',
|
|
68
|
+
top: enable ? '' : '0',
|
|
69
|
+
opacity: enable ? '' : '0',
|
|
70
|
+
left: enable ? '' : '-999em'
|
|
71
|
+
}, importantProperties);
|
|
61
72
|
}
|
|
62
73
|
/**
|
|
63
74
|
* Combines a transform string with an optional other transform
|
|
64
75
|
* that exited before the base transform was applied.
|
|
65
76
|
*/
|
|
66
77
|
function combineTransforms(transform, initialTransform) {
|
|
67
|
-
return initialTransform
|
|
78
|
+
return initialTransform && initialTransform != 'none' ?
|
|
79
|
+
(transform + ' ' + initialTransform) :
|
|
80
|
+
transform;
|
|
68
81
|
}
|
|
69
82
|
|
|
70
83
|
/**
|
|
@@ -197,7 +210,7 @@ class ParentPositionTracker {
|
|
|
197
210
|
}
|
|
198
211
|
/** Handles scrolling while a drag is taking place. */
|
|
199
212
|
handleScroll(event) {
|
|
200
|
-
const target =
|
|
213
|
+
const target = _getEventTarget(event);
|
|
201
214
|
const cachedPosition = this.positions.get(target);
|
|
202
215
|
if (!cachedPosition) {
|
|
203
216
|
return null;
|
|
@@ -232,10 +245,6 @@ class ParentPositionTracker {
|
|
|
232
245
|
return { top: topDifference, left: leftDifference };
|
|
233
246
|
}
|
|
234
247
|
}
|
|
235
|
-
/** Gets the target of an event while accounting for shadow dom. */
|
|
236
|
-
function getEventTarget(event) {
|
|
237
|
-
return (event.composedPath ? event.composedPath()[0] : event.target);
|
|
238
|
-
}
|
|
239
248
|
|
|
240
249
|
/**
|
|
241
250
|
* @license
|
|
@@ -320,6 +329,11 @@ const activeEventListenerOptions = normalizePassiveListenerOptions({ passive: fa
|
|
|
320
329
|
* addition to touch events.
|
|
321
330
|
*/
|
|
322
331
|
const MOUSE_EVENT_IGNORE_TIME = 800;
|
|
332
|
+
/** Inline styles to be set as `!important` while dragging. */
|
|
333
|
+
const dragImportantProperties = new Set([
|
|
334
|
+
// Needs to be important, because some `mat-table` sets `position: sticky !important`. See #22781.
|
|
335
|
+
'position'
|
|
336
|
+
]);
|
|
323
337
|
/**
|
|
324
338
|
* Reference to a draggable item. Used to manipulate or dispose of the item.
|
|
325
339
|
*/
|
|
@@ -395,7 +409,7 @@ class DragRef {
|
|
|
395
409
|
// Delegate the event based on whether it started from a handle or the element itself.
|
|
396
410
|
if (this._handles.length) {
|
|
397
411
|
const targetHandle = this._handles.find(handle => {
|
|
398
|
-
const target =
|
|
412
|
+
const target = _getEventTarget(event);
|
|
399
413
|
return !!target && (target === handle || handle.contains(target));
|
|
400
414
|
});
|
|
401
415
|
if (targetHandle && !this._disabledHandles.has(targetHandle) && !this.disabled) {
|
|
@@ -802,7 +816,7 @@ class DragRef {
|
|
|
802
816
|
// We move the element out at the end of the body and we make it hidden, because keeping it in
|
|
803
817
|
// place will throw off the consumer's `:last-child` selectors. We can't remove the element
|
|
804
818
|
// from the DOM completely, because iOS will stop firing all subsequent events in the chain.
|
|
805
|
-
toggleVisibility(element, false);
|
|
819
|
+
toggleVisibility(element, false, dragImportantProperties);
|
|
806
820
|
this._document.body.appendChild(parent.replaceChild(placeholder, element));
|
|
807
821
|
this._getPreviewInsertionPoint(parent, shadowRoot).appendChild(this._preview);
|
|
808
822
|
this.started.next({ source: this }); // Emit before notifying the container.
|
|
@@ -834,9 +848,11 @@ class DragRef {
|
|
|
834
848
|
const isTouchSequence = isTouchEvent(event);
|
|
835
849
|
const isAuxiliaryMouseButton = !isTouchSequence && event.button !== 0;
|
|
836
850
|
const rootElement = this._rootElement;
|
|
837
|
-
const target =
|
|
851
|
+
const target = _getEventTarget(event);
|
|
838
852
|
const isSyntheticEvent = !isTouchSequence && this._lastTouchEventTime &&
|
|
839
853
|
this._lastTouchEventTime + MOUSE_EVENT_IGNORE_TIME > Date.now();
|
|
854
|
+
const isFakeEvent = isTouchSequence ? isFakeTouchstartFromScreenReader(event) :
|
|
855
|
+
isFakeMousedownFromScreenReader(event);
|
|
840
856
|
// If the event started from an element with the native HTML drag&drop, it'll interfere
|
|
841
857
|
// with our own dragging (e.g. `img` tags do it by default). Prevent the default action
|
|
842
858
|
// to stop it from happening. Note that preventing on `dragstart` also seems to work, but
|
|
@@ -847,7 +863,7 @@ class DragRef {
|
|
|
847
863
|
event.preventDefault();
|
|
848
864
|
}
|
|
849
865
|
// Abort if the user is already dragging or is using a mouse button other than the primary one.
|
|
850
|
-
if (isDragging || isAuxiliaryMouseButton || isSyntheticEvent) {
|
|
866
|
+
if (isDragging || isAuxiliaryMouseButton || isSyntheticEvent || isFakeEvent) {
|
|
851
867
|
return;
|
|
852
868
|
}
|
|
853
869
|
// If we've got handles, we need to disable the tap highlight on the entire root element,
|
|
@@ -889,7 +905,7 @@ class DragRef {
|
|
|
889
905
|
// It's important that we maintain the position, because moving the element around in the DOM
|
|
890
906
|
// can throw off `NgFor` which does smart diffing and re-creates elements only when necessary,
|
|
891
907
|
// while moving the existing elements in all other cases.
|
|
892
|
-
toggleVisibility(this._rootElement, true);
|
|
908
|
+
toggleVisibility(this._rootElement, true, dragImportantProperties);
|
|
893
909
|
this._anchor.parentNode.replaceChild(this._rootElement, this._anchor);
|
|
894
910
|
this._destroyPreview();
|
|
895
911
|
this._destroyPlaceholder();
|
|
@@ -992,14 +1008,14 @@ class DragRef {
|
|
|
992
1008
|
extendStyles(preview.style, {
|
|
993
1009
|
// It's important that we disable the pointer events on the preview, because
|
|
994
1010
|
// it can throw off the `document.elementFromPoint` calls in the `CdkDropList`.
|
|
995
|
-
|
|
1011
|
+
'pointer-events': 'none',
|
|
996
1012
|
// We have to reset the margin, because it can throw off positioning relative to the viewport.
|
|
997
|
-
margin: '0',
|
|
998
|
-
position: 'fixed',
|
|
999
|
-
top: '0',
|
|
1000
|
-
left: '0',
|
|
1001
|
-
|
|
1002
|
-
});
|
|
1013
|
+
'margin': '0',
|
|
1014
|
+
'position': 'fixed',
|
|
1015
|
+
'top': '0',
|
|
1016
|
+
'left': '0',
|
|
1017
|
+
'z-index': `${this._config.zIndex || 1000}`
|
|
1018
|
+
}, dragImportantProperties);
|
|
1003
1019
|
toggleNativeDragInteractions(preview, false);
|
|
1004
1020
|
preview.classList.add('cdk-drag-preview');
|
|
1005
1021
|
preview.setAttribute('dir', this._direction);
|
|
@@ -1038,7 +1054,7 @@ class DragRef {
|
|
|
1038
1054
|
return this._ngZone.runOutsideAngular(() => {
|
|
1039
1055
|
return new Promise(resolve => {
|
|
1040
1056
|
const handler = ((event) => {
|
|
1041
|
-
if (!event || (
|
|
1057
|
+
if (!event || (_getEventTarget(event) === this._preview &&
|
|
1042
1058
|
event.propertyName === 'transform')) {
|
|
1043
1059
|
this._preview.removeEventListener('transitionend', handler);
|
|
1044
1060
|
resolve();
|
|
@@ -1184,8 +1200,12 @@ class DragRef {
|
|
|
1184
1200
|
const transform = getTransform(x, y);
|
|
1185
1201
|
// Cache the previous transform amount only after the first drag sequence, because
|
|
1186
1202
|
// we don't want our own transforms to stack on top of each other.
|
|
1203
|
+
// Should be excluded none because none + translate3d(x, y, x) is invalid css
|
|
1187
1204
|
if (this._initialTransform == null) {
|
|
1188
|
-
this._initialTransform = this._rootElement.style.transform
|
|
1205
|
+
this._initialTransform = this._rootElement.style.transform
|
|
1206
|
+
&& this._rootElement.style.transform != 'none'
|
|
1207
|
+
? this._rootElement.style.transform
|
|
1208
|
+
: '';
|
|
1189
1209
|
}
|
|
1190
1210
|
// Preserve the previous `transform` value, if there was one. Note that we apply our own
|
|
1191
1211
|
// transform before the user's, because things like rotation can affect which direction
|
|
@@ -1287,7 +1307,7 @@ class DragRef {
|
|
|
1287
1307
|
_updateOnScroll(event) {
|
|
1288
1308
|
const scrollDifference = this._parentPositions.handleScroll(event);
|
|
1289
1309
|
if (scrollDifference) {
|
|
1290
|
-
const target =
|
|
1310
|
+
const target = _getEventTarget(event);
|
|
1291
1311
|
// ClientRect dimensions are based on the scroll position of the page and its parent node so
|
|
1292
1312
|
// we have to update the cached boundary ClientRect if the user has scrolled. Check for
|
|
1293
1313
|
// the `document` specifically since IE doesn't support `contains` on it.
|