Skip to content

Commit

Permalink
[Fix] attachBody - reposition dropdown on message display
Browse files Browse the repository at this point in the history
Resolves: select2#4614
Previous behavior: whenever a message is displayed, results are cleared
out, but dropdown is not repositioned, resulting in a floating search
box based off of last position.
Fixed behavior: when a message is displayed, reposition the dropdown
accordingly
  • Loading branch information
AStoker committed Jan 5, 2018
1 parent e02b34b commit 029303e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/js/select2/dropdown/attachBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ define([
self._positionDropdown();
self._resizeDropdown();
});

container.on('results:message', function () {
self._positionDropdown();
self._resizeDropdown();
});
}
});

Expand Down

0 comments on commit 029303e

Please sign in to comment.