Question

I need to implement autocomplete select box inside jqueryUI dialog.

See it here: http://jsfiddle.net/zcgWa/

Currently dialog is overflowing the select box. (click the select box) I have found a solution by removing jqueryUI style overflow:hidden.

.ui-dialog {
overflow: hidden;
position: absolute;
top: 0;
left: 0;
padding: .2em;
outline: 0;
}

But the overflow is a native dialog style that comes by default, that is why I think it is not the perfect solution. I also have many other dialogs pop-ups accross the project and removing oveflow might cause some of them not to work properly.

Is there any other better solution?

Thanks.

Was it helpful?

Solution

I managed to fix this by appending the <input> that represents the dropdown to the wrapper after the autocomplete and tooltip has been created. i.e. Move line 18 of your JS Fiddle

.appendTo( this.wrapper )

to line 30 (after this):

.tooltip({
    tooltipClass: "ui-state-highlight"
})
.appendTo( this.wrapper );

See http://jsfiddle.net/nA5L2/1/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top