fix(overlays): get the precise referenceNode width
This commit is contained in:
parent
0fbdf5a8bf
commit
c61be3a844
1 changed files with 1 additions and 2 deletions
|
|
@ -1098,8 +1098,7 @@ export class OverlayController extends EventTargetShim {
|
||||||
if (!this._referenceNode || this.placementMode === 'global') {
|
if (!this._referenceNode || this.placementMode === 'global') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const referenceWidth = `${this._referenceNode.getBoundingClientRect().width}px`;
|
||||||
const referenceWidth = `${this._referenceNode.clientWidth}px`;
|
|
||||||
switch (this.inheritsReferenceWidth) {
|
switch (this.inheritsReferenceWidth) {
|
||||||
case 'max':
|
case 'max':
|
||||||
this.contentWrapperNode.style.maxWidth = referenceWidth;
|
this.contentWrapperNode.style.maxWidth = referenceWidth;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue