Hi,
We maintain a self-made Confluence plugin which no longer works as expected after upgrading Confluence from version 6.13.4 to 7.4.5. The plugin fetches a long list of items from an external source and let’s the user pick an item via an autocompleted input field. I’ve tracked down the problem to a very minimal example of what essentially happens in our code. An input field is added to the DOM and a list of values for autocompletion is added to it:
$("#macro-insert-container .macro-input-fields").append("<input id='test-input' type='text'/>")
$("#test-input").autocomplete({
source: [ "Choice1", "Choice2" ]
});
This autocomplete()
no longer works as before, the input field no longer shows any dropdown menu and no signs of autocompletion. All I find is a new ol
element that got created:
<input id="test-input" type="text">
<ol class="autocompleter" style="position: absolute; width: 175px; margin: -1px 0px 0px; display: none;"></ol>
Interestingly enough, this introduces a new effect that I don’t understand. When typing some characters into the input field, a GET
request gets issued to this URL (resulting in error 404):
https://my.domain/confluence/pages/[object%20Object]Choice?_=1613554085531
Any ideas what’s going on here and why our autocompletion stopped working?
What is the recommended way of implementing an autocompleted input field?
Regards,
Dominik