From 9f5975eb5bbf0dc76b1d24c9d99c2f6fbda451ce Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 15 May 2024 14:52:44 +0300 Subject: [PATCH] autocomplete in modal fix --- client/src/ui/autocomplete.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/ui/autocomplete.js b/client/src/ui/autocomplete.js index 65fbfa47cf..7538ee0f43 100644 --- a/client/src/ui/autocomplete.js +++ b/client/src/ui/autocomplete.js @@ -91,6 +91,8 @@ class Autocomplete { } : undefined; + const $modalBody = this.$element.closest('.modal-body'); + this.$element.autocomplete({ beforeRender: $container => { if (options.beforeRender) { @@ -113,6 +115,8 @@ class Autocomplete { minChars: options.minChars || 0, noCache: true, autoSelectFirst: options.autoSelectFirst, + appendTo: $modalBody.length ? $modalBody : 'body', + forceFixPosition: true, formatResult: item => { if (options.formatResult) { return options.formatResult(item);