From 6a054f768136de2caeaecf6c0fe9ffad76281373 Mon Sep 17 00:00:00 2001 From: Viktor Grabov Date: Wed, 6 Jan 2021 11:32:13 +0300 Subject: [PATCH] Fixed #32322 -- Fixed autocomplete widget wrapping. --- AUTHORS | 1 + django/contrib/admin/static/admin/css/autocomplete.css | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index b4b1fc2529d..2c7881bfb33 100644 --- a/AUTHORS +++ b/AUTHORS @@ -935,6 +935,7 @@ answer newbie questions, and generally made Django that much better: Victor Andrée viestards.lists@gmail.com Viktor Danyliuk + Viktor Grabov Ville Säävuori Vinay Karanam Vinay Sajip diff --git a/django/contrib/admin/static/admin/css/autocomplete.css b/django/contrib/admin/static/admin/css/autocomplete.css index 3ef95d15f0a..be98cb4bfd9 100644 --- a/django/contrib/admin/static/admin/css/autocomplete.css +++ b/django/contrib/admin/static/admin/css/autocomplete.css @@ -104,8 +104,10 @@ select.admin-autocomplete { box-sizing: border-box; list-style: none; margin: 0; - padding: 0 5px; + padding: 0 10px 5px 5px; width: 100%; + display: flex; + flex-wrap: wrap; } .select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__rendered li { @@ -123,6 +125,8 @@ select.admin-autocomplete { float: right; font-weight: bold; margin: 5px; + position: absolute; + right: 0; } .select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__choice {