I see the issue. body or html needs to be positioned relative. In other case 
recordselect 
position absolute works like position fixed, i.e. relative to window instead of 
document, 
so bottom: 0px is window bottom.

I usually have body { position: relative; } in my css, however I have added 
some code to 
fix position record select above input when body or html doesn't have position 
relative.

You can update record select or add body { position: relative; } to your css.

El Jueves, 26 de marzo de 2015 09:20:38 Sergio Cambra escribió:
> El Miércoles, 25 de marzo de 2015 16:04:14 mvargo escribió:
> > A bit more info.  I find that if I use a tall monitor and scroll the page
> > so that there is plenty of room for the autocomplete to fit below the
> > input
> > element, the recordselect div positions correctly.  It's only when I don't
> > have room  below to fit the div it puts in the bottom value that is too
> > large.
> > 
> > looking at the code I see in the show: function on the Recordselect
> > (jquery/record_select.js in the gem line 214 is show:)
> > 
> >       if (position == 'top') this.container.css('top', top);
> >       else this.container.css('bottom', document_height - offset.top);
> > 
> > So it seems to me the calculation of the bottom height is not working.
> > 
> >  Document_height is  found above there as
> > 
> > document_height = jQuery(document).height();
> > 
> > Maybe that is the entire document height but you want the window height?
> > 
> >  I'm not really an expert at client side javascript...
> 
> How is input positioned? static? fixed? If record select has an absolute
> position, we want document height, because bottom 0 is at document bottom.
> However if input has fixed position, then we need to use window height.
> 
> I would need a test page so I can see why is not positioned right to fix it.

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/activescaffold.
For more options, visit https://groups.google.com/d/optout.

Reply via email to