movableink / ember-pop-over

A pop-over component for Ember apps
MIT License
15 stars 22 forks source link

Popover does not resize properly when content size changes #33

Open sarus opened 8 years ago

sarus commented 8 years ago

I'm currently using the popover to display a search widget. The widget has some controls that when toggled can cause the popover to expand in size (works great). The issues arises when doing the following:

  1. Cause the widget to expand by selecting an option inside of it that adds a div (pushing the popover down)
  2. Close the popover by clicking out of it
  3. Open the popover
  4. Cause the widget to "contract" by selecting an option that remove the div
  5. The Popover does not resize itself properly (specifically the popover-compass div)

Note: If the popover starts off at the smaller size then it works fine. The issue only happens when you start at the larger size and then go to the smaller size.

At this point the popover-compass class has a height that is too large and results in a black bar at the bottom of the popover. I know the description is a bit hard to follow so I attached a screenshot of what this looks like:

image

Is there some way to force a "repaint" of the popover so it will resize itself properly under these circumstances?

tim-evans commented 8 years ago

This will be solvable with the new willRender hook in Ember.

tim-evans commented 8 years ago

Or by using a DOM mutation observer, like Liquid Fire