Autocomplete Post to wrong url when not hosting in root (/)

Summary

Autocomplete Post to wrong url when not hosting in root (/)

Steps to reproduce

Configure gitlab to run at a sub directory (e.g /gitlab) Make a search at issues pages

Actual behavior

Screen does not show a feedback and Chrome console shows the parser error and a 404 network request.

Relevant logs and/or screenshots

image