1
0
mirror of synced 2024-11-22 04:56:08 +03:00

Fix dropdown positioning when displayed above with messages (#5592)

This fixes an issue which was usually observed when working with
AJAX results sets and having a message being displayed, usually the
minimum characters message or an error. The dropdown would display
up, like it was supposed to, but the message would appear to be
floating above the container and detached.

This was occuring because the dropdown position was not being
calculated whenever a message was displayed in the results, only
when the results were loaded or new results were appended to an existing
results set. There are plenty of situations where this could have
caused issues, but somehow most of the reports were around a very
specific situation with AJAX which could be reproduced on the
examples site.

Fixes #4614
Fixes #4616
Fixes #5253
Closes #5196
This commit is contained in:
Kevin Brown 2019-07-28 15:16:30 -04:00 committed by GitHub
parent 525f661915
commit 472e5ad50f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,11 @@ define([
self._resizeDropdown(); self._resizeDropdown();
}); });
container.on('results:message', function () {
self._positionDropdown();
self._resizeDropdown();
});
container.on('select', function () { container.on('select', function () {
self._positionDropdown(); self._positionDropdown();
self._resizeDropdown(); self._resizeDropdown();