# Perspective Popup height changes when dragged

**URL:** <https://forum.inductiveautomation.com/t/perspective-popup-height-changes-when-dragged/96657>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 1, 2024, 1:08pm UTC](https://forum.inductiveautomation.com/t/perspective-popup-height-changes-when-dragged/96657 "2024-10-01T13:08:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ujwal\_Wankhede](https://avatars.discourse-cdn.com/v4/letter/u/4af34b/32.png) [@Ujwal\_Wankhede](https://forum.inductiveautomation.com/u/Ujwal_Wankhede)\
**Post date:** [October 1, 2024, 1:08pm UTC](https://forum.inductiveautomation.com/t/perspective-popup-height-changes-when-dragged/96657/1 "2024-10-01T13:08:32Z")

</div>

I created a popup that dynamically resizes based on its content. That work as expected.  
However, when dragging the popup, its height no longer adjusts accordingly.  
Instead, a static value is applied to the element in the DOM.  
Details is in recording

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 2, 2024, 6:21pm UTC](https://forum.inductiveautomation.com/t/perspective-popup-height-changes-when-dragged/96657/2 "2024-10-02T18:21:16Z")

</div>

I'll follow this up in the morning as I'm sure one of our engineers faced this problem and resolved it, if someone doesn't chime in earlier

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 2, 2024, 6:23pm UTC](https://forum.inductiveautomation.com/t/perspective-popup-height-changes-when-dragged/96657/3 "2024-10-02T18:23:51Z")

</div>

> [@Perspective Popup runtime resize behavior](https://forum.inductiveautomation.com/t/perspective-popup-runtime-resize-behavior/57007):
>
> I would like to open a popup view and resize it while it is open if the user clicks on a button. When the popup is open and not moved (from the position it was open on) the enlargement of the popup works perfectly fine, meaning it resizes to the new dimension and with a close button it will shrink down to the original size. The problem occurs when I drag/move the pop up from the position it was opened at and then try to resize it . The following is the original sized popup this is …

This is what I was thinking of

---

<div class="post-metadata">

**Author:** ![Ujwal\_Wankhede](https://avatars.discourse-cdn.com/v4/letter/u/4af34b/32.png) [@Ujwal\_Wankhede](https://forum.inductiveautomation.com/u/Ujwal_Wankhede)\
**Post date:** [October 3, 2024, 4:35am UTC](https://forum.inductiveautomation.com/t/perspective-popup-height-changes-when-dragged/96657/4 "2024-10-03T04:35:51Z")

</div>

Thank you, @nminchin, for taking the time to attach the solution—it worked perfectly!  
Also, thanks to @victordcq for the helpful techniques.  
Although the forum search surfaced the relevant post, I somehow overlooked it.  
I appreciate the help!

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 3, 2024, 6:29am UTC](https://forum.inductiveautomation.com/t/perspective-popup-height-changes-when-dragged/96657/5 "2024-10-03T06:29:04Z")

</div>

Since i made that post there has been some updates so, now the best way to add the css is to use the advanded stylesheet.css

---

<div class="post-metadata">

**Author:** ![Ujwal\_Wankhede](https://avatars.discourse-cdn.com/v4/letter/u/4af34b/32.png) [@Ujwal\_Wankhede](https://forum.inductiveautomation.com/u/Ujwal_Wankhede)\
**Post date:** [October 3, 2024, 6:47am UTC](https://forum.inductiveautomation.com/t/perspective-popup-height-changes-when-dragged/96657/6 "2024-10-03T06:47:54Z")

</div>

You're right. I've applied the following in the stylesheet to handle popup height adjustments.

```python
.ia_popup[id^="popup-"]{
    height: auto !important;
}

```

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 10, 2024, 6:45am UTC](https://forum.inductiveautomation.com/t/perspective-popup-height-changes-when-dragged/96657/7 "2024-10-10T06:45:41Z")

</div>

I feel it might be useful to add that you can actually set the popup View's `defaultSize` props to `auto` which will auto size the popup based on its content, and expand as necessary if content it dynamically added. It relies on this though

> [@Ujwal\_Wankhede](#):
>
> ```python
> .ia_popup[id^="popup-"]{
> height: auto !important;
> }
> 
> ```
