fix(overlays): remove setting inheritsReferenceWidth by default
This commit is contained in:
parent
5271f056b7
commit
8237b64a3b
2 changed files with 10 additions and 8 deletions
|
|
@ -26,7 +26,7 @@ export class OverlayController {
|
|||
invokerNode: config.invokerNode,
|
||||
referenceNode: null,
|
||||
elementToFocusAfterHide: document.body,
|
||||
inheritsReferenceWidth: 'min',
|
||||
inheritsReferenceWidth: '',
|
||||
hasBackdrop: false,
|
||||
isBlocking: false,
|
||||
preventsScroll: false,
|
||||
|
|
@ -498,8 +498,10 @@ export class OverlayController {
|
|||
case 'full':
|
||||
this._contentNodeWrapper.style.width = referenceWidth;
|
||||
break;
|
||||
default:
|
||||
case 'min':
|
||||
this._contentNodeWrapper.style.minWidth = referenceWidth;
|
||||
break;
|
||||
/* no default */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -202,14 +202,14 @@ describe('Local Positioning', () => {
|
|||
`);
|
||||
await ctrl.show();
|
||||
expect(normalizeTransformStyle(ctrl.content.style.transform)).to.equal(
|
||||
'translate3d(0px, -28px, 0px)',
|
||||
'translate3d(10px, -28px, 0px)',
|
||||
'Popper positioning values',
|
||||
);
|
||||
|
||||
await ctrl.hide();
|
||||
await ctrl.show();
|
||||
expect(normalizeTransformStyle(ctrl.content.style.transform)).to.equal(
|
||||
'translate3d(0px, -28px, 0px)',
|
||||
'translate3d(10px, -28px, 0px)',
|
||||
'Popper positioning values should be identical after hiding and showing',
|
||||
);
|
||||
});
|
||||
|
|
@ -242,7 +242,7 @@ describe('Local Positioning', () => {
|
|||
|
||||
await ctrl.show();
|
||||
expect(normalizeTransformStyle(ctrl.content.style.transform)).to.equal(
|
||||
'translate3d(0px, -30px, 0px)',
|
||||
'translate3d(10px, -30px, 0px)',
|
||||
'Popper positioning values',
|
||||
);
|
||||
|
||||
|
|
@ -258,7 +258,7 @@ describe('Local Positioning', () => {
|
|||
await ctrl.show();
|
||||
expect(ctrl._popper.options.modifiers.offset.offset).to.equal('0, 20px');
|
||||
expect(normalizeTransformStyle(ctrl.content.style.transform)).to.equal(
|
||||
'translate3d(0px, -40px, 0px)',
|
||||
'translate3d(10px, -40px, 0px)',
|
||||
'Popper positioning Y value should be 10 less than previous, due to the added extra 10px offset',
|
||||
);
|
||||
});
|
||||
|
|
@ -292,7 +292,7 @@ describe('Local Positioning', () => {
|
|||
|
||||
await ctrl.show();
|
||||
expect(normalizeTransformStyle(ctrl.content.style.transform)).to.equal(
|
||||
'translate3d(0px, -30px, 0px)',
|
||||
'translate3d(10px, -30px, 0px)',
|
||||
'Popper positioning values',
|
||||
);
|
||||
|
||||
|
|
@ -305,7 +305,7 @@ describe('Local Positioning', () => {
|
|||
},
|
||||
});
|
||||
expect(normalizeTransformStyle(ctrl.content.style.transform)).to.equal(
|
||||
'translate3d(0px, -40px, 0px)',
|
||||
'translate3d(10px, -40px, 0px)',
|
||||
'Popper positioning Y value should be 10 less than previous, due to the added extra 10px offset',
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue