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') {
|
||||
return;
|
||||
}
|
||||
|
||||
const referenceWidth = `${this._referenceNode.clientWidth}px`;
|
||||
const referenceWidth = `${this._referenceNode.getBoundingClientRect().width}px`;
|
||||
switch (this.inheritsReferenceWidth) {
|
||||
case 'max':
|
||||
this.contentWrapperNode.style.maxWidth = referenceWidth;
|
||||
|
|
|
|||
Loading…
Reference in a new issue