- The current implementation of Button and Menu are designed only to take
into consideration the dimensions of the browser viewport and reposition
the Menu accordingly. There is no support for specifying another DOM
element as the bounding box used to control the position for a Menu, but
that is on my list as a future enhancement. For the time being you'll
have to stick with your custom solution.
> The split button sits at the bottom of a div that represents a window
> and the menu goes beyond the boundaries of the div and causes
> scrollbars to appear in the div this is very ugly (overflow: auto for
> this div). So it seems that the positioning algorithm may not work as
> intended because even though the menu may be inside the browser area,
> it will still be hidden because it goes out of bounds in the parent
> div. So, I was trying to force the menu to appear on top. My current
> solution is to use a push button and code the menu appearing
> manually, that's not too bad using YUI but not ideal.
> One more thing, even if i size my browser window such that i force
> the split button to show the menu above then I still get the
> scrollbars in the parent div. It seems it always positions it below
> and then repositioning above if needed rather than only position it
> in one place.
> An HTML SELECT list may behave similarly but it will at least show
> above any page content so all the options are always visible. In the
> case of the split button if the menu is obstructed by other content
> it will not be visible so I think it would be reasonable that it
> provides a way to control the position of the menu.
> Thank you.
> > "ajaxgames" -
> > Neither the Split Button or Menu Button implementations currently
> > for configuration of the default orientation of the Menu relative
> to the
> > Button as the Button code is designed to be aware of the boundaries
> > the browser viewport and automatically change the Menu's position
> > order to keep it in view. What is the use case for your need to
> > position the Menu above the Button by default?
> > - Todd
> > ajaxgames wrote:
> > >
> > > Hello,
> > >
> > > I would like the menu/overlay that appears when clicking on a
> > > button to appear above the button rather than below it. Is this
> > > possible?
> > >
> > > I tried setting the context of the overlay manually but the button
> > > control seems to replace it again an put it below on every call.
> If I
> > > force it every time it kind of works but it has two problems, 1.
> > > momentarily appears below before being repositioned above the
> > > and 2. because the button is at the bottom of the area and the
> menu is
> > > large it causes the area to "grow" and scrollbars to appear.
> > >
> > > Thank You!
> > >
> > >