Skip to content

Popover miscalculates height when using a multiline TextField #4806

@mrcthms

Description

@mrcthms

Issue summary

A Popover will explicitly set the height on the overlay, which is calculated based on the contents of the Popover. However, when the contents of the Popover include a TextField component, which has a numerical multiline prop, the height of the Popover gets calculated and set incorrectly.

Expected behavior

The Popover should correctly calculate the height of the contents.

Actual behavior

It calculates it incorrectly – it uses the default height value of the TextField.

Steps to reproduce the problem

  1. Create a Popover with a multiline Textfield in its contents
  2. Observe the Popover being cut off.

Reduced test case

https://codesandbox.io/s/optimistic-water-4fgqj?file=/App.js

Specifications

  • Are you using the React components? (Y):
  • Polaris version number: 7.2.0
  • Browser: Chrome
  • Device: MacBook
  • Operating System: OSX

Metadata

Metadata

Labels

BugSomething is broken and not working as intended in the system.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions