Si no puede quitar el overflow: auto Usted puede hacer algo como esto
$('.drop-down-inside-modal').on('click' , '.dropdown-toggle', function(event){
var self = $(this);
var selfHeight = $(this).parent().height();
var selfWidth = $(this).parent().width();
var selfOffset = $(self).offset();
var selfOffsetRigth = $(document).width() - selfOffset.left - selfWidth;
var dropDown = self.parent().find('ul');
$(dropDown).css({position:'fixed', top: selfOffset.top + selfHeight , left: 'auto', right: selfOffsetRigth , width: '160px'});
});
function fixDropdownPosition(){
var openDropdownButton = $('.drop-down-inside-modal.open');
if($(openDropdownButton).length){
var selfHeight = $(openDropdownButton).height();
var selfWidth = $(openDropdownButton).width();
var openDropdownButtonOffset = $(openDropdownButton).offset();
var openDropdownButtonOffsetRigth = $(document).width() - openDropdownButtonOffset.left - selfWidth;
var openDropdown = $(openDropdownButton).find('ul');
$(openDropdown).css({position:'fixed', top: openDropdownButtonOffset.top + selfHeight , left: 'auto' , right: openDropdownButtonOffsetRigth, width: '160px'});
};
};
$(".modal-body").unbind("scroll");
$(".modal-body").scroll(function(){
fixDropdownPosition();
});
$(window).resize(function() {
fixDropdownPosition();
});
¿Por qué no hacer que el diálogo modal más grande? –
La cantidad de elementos en el menú desplegable es dinámica, por lo que tendré que calcular el espacio que necesito. Si hago eso, también podría simplemente escribir los enlaces directamente al diálogo, que no es realmente lo que quiero. – flyx