Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dd-draggable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ export class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt
this.helperContainment = this.helper.parentElement;
if (this.helper.style.position !== 'fixed') {
this.parentOriginStylePosition = this.helperContainment.style.position;
if (window.getComputedStyle(this.helperContainment).position.match(/static/)) {
if (getComputedStyle(this.helperContainment).position.match(/static/)) {
this.helperContainment.style.position = 'relative';
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/dd-resizable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export class DDResizable extends DDBaseImplement implements HTMLElementExtendOpt
protected _setupHelper(): DDResizable {
this.elOriginStyleVal = DDResizable._originStyleProp.map(prop => this.el.style[prop]);
this.parentOriginStylePosition = this.el.parentElement.style.position;
if (window.getComputedStyle(this.el.parentElement).position.match(/static/)) {
if (getComputedStyle(this.el.parentElement).position.match(/static/)) {
this.el.parentElement.style.position = 'relative';
}
this.el.style.position = 'absolute';
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ export class Utils {
}

// public static setPositionRelative(el: HTMLElement): void {
// if (!(/^(?:r|a|f)/).test(window.getComputedStyle(el).position)) {
// if (!(/^(?:r|a|f)/).test(getComputedStyle(el).position)) {
// el.style.position = "relative";
// }
// }
Expand Down