question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dropdown positioning problem

See original GitHub issue

When component is not rendered in place, dropdown is appended to div with id ember-basic-dropdown-wormhole which is added to body. In my use case, body is not scrollable and a section of the body is scrollable in which power select is used. In this scenario when scrollable section is scrolled, trigger scrolls with the scrollable section, but dropdown doesn’t scroll along with trigger as it is positioned absolute(parent element is body). If select is at the bottom of the section and rendered in place, dropdown goes down(There is no auto positioning for render in place).

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
evoactivitycommented, Jul 14, 2017

I’m posting in this old issue as none of the options work for me.

I have a panel that has an outlet, but my outlet is in a liquid-outlet so renderInPlace and destination both don’t work because the height of the outlet is defined by by liquid-fire. The results get cut off by the overflow and destination doesn’t work because it’s getting it’s offset from the window left and not from it’s containing element, as it exists in a liquid-outlet it has position:absolute; on the container, so I was going to force the no scroll using the css posted above for the wormhole container, but .is-dropdown-open is never added to the container.

Does anyone have a way forward?

1reaction
cibernoxcommented, Feb 17, 2016

Yes, I’ve updated the docs showing how to customize this: https://ember-power-select.pagefrontapp.com/docs/the-list

I think that in your case since the app is not scrollable but some element inside, that could be fixed if instead of insertig the content of the select in a child of the body, you attach it to a child of the element of the element that has the scroll. Perhaps you need to make the element that contains the scroll position: relative, but I think that this might work

ENV['ember-basic-dropdown'] = {
  destination: 'power-select-render-target'
}
<div class="main-content-with-scroll">
  {{outlet}}
  <div id="power-select-render-target"></div>
</div>

You need to update to the very last version of the component to do that.

Makes sense?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dropdown position Issue [closed] - Stack Overflow
I'm working on navbar dropdown menu and him having some trouble trying to position the dropdown menu with a width 100% but when...
Read more >
Absolute positioning of dropdown can cause problems #568
The dropdown cannot be displayed outside of the container-div then, so it is partially hidden. The "workaround" is to make the ".choices" div ......
Read more >
dropdown-menu not auto positioning
Expected behavior when scrolled to the bottom of the page dropdown menu should auto position to top. Actual behavior no css style is...
Read more >
dropdown positioning problem in UI for ASP.NET AJAX - Telerik
I have a RADComboBox thats populated from a database (there are 4 items). when I select the dropdown, the actual dropdown menu appears...
Read more >
Positioning a content below a drop down button
Problem: My drop down menu wont position it self as “block” or drop down, instead its side by side(link1, link2, link3) .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found