ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: Popover only working from top

Open buschjost opened this issue 12 years ago • 8 comments

Type: bug

Platform: all

I followed the example from there blog post to add Popover to my app. However, these seem only to work when the popover binds to an element above itself. I tried to use a tabbed navigation with tabs on bottom and open a popover on click on the tab. Doing so creates a popover that is not visible because is renders below the tab bar off-screen. I see the popover being rendered due to the fade-out effect of the while app. I would expect popovers to render from the bottom as well. Maybe with a developer configured 'render' option telling it to render over or below the current element.

buschjost avatar Aug 18 '14 08:08 buschjost

Here is a codepen to reproduce the issue http://codepen.io/dbaq/pen/oycLD

dbaq avatar Aug 18 '14 16:08 dbaq

I think the best scenario would be for popovers to display the same way that the 'options' popover is presented on a select element in an iPad. The popover content is scrollable, and the popover itself is positioned above or below the target element, based on the target's position. The popover should utilize all available screen height from the target to the top or bottom (whichever is greater), minus any headers, padding, etc.

mbuster avatar Aug 19 '14 13:08 mbuster

@mbuster what about if the popover content is smaller than all the height, it looks really bad if you have to menu option an a popover over all the screen?

sunsus avatar Aug 19 '14 15:08 sunsus

I should have specified, but there have already been a number of requests to make the popover height be dynamic as opposed to fixed by default, which is what I imagine we'll see before long. So regarding the size/position, I would envision the height being dynamic, using UP TO the available screen space above or below the target, but only using as much space as smaller content would require. Just like the options popover on iPad.

mbuster avatar Aug 19 '14 15:08 mbuster

I think it would make sense to have a hight attribute on the ion-popover-view to limit the hight.

sunsus avatar Aug 19 '14 16:08 sunsus

You can do that now, just set a max-height via css or in the style of your ion-popover-view element.

mbuster avatar Aug 19 '14 16:08 mbuster

Fixed in https://github.com/driftyco/ionic/commit/5d06c4aef8bf39703f9f4f32de52dad7749d1de5

mhartington avatar Aug 20 '14 18:08 mhartington

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

ionitron-bot[bot] avatar Sep 06 '18 13:09 ionitron-bot[bot]