Autocomplete issue into bootstrap modal

前端 未结 11 2565
旧时难觅i
旧时难觅i 2020-12-01 05:57

I have a display problem in the jQuery autocomplete inside a modal dialog bootstrap.

When I mouse scroll, the results do not remain attached to the input.

Is

11条回答
  •  天命终不由人
    2020-12-01 06:34

    The position is right that it is "absolute", while you need to specify this as an option to autocomplete:

    $( ".addresspicker" ).autocomplete( "option", "appendTo", ".eventInsForm" );
    

    Where it can anchor the box with the results in any element, I have to stop it from being anchored to the form's class!

    Here is a working JsFiddle!.

提交回复
热议问题