Opened 11 months ago

Closed 10 months ago

Last modified 10 months ago

#28685 closed Bug (fixed)

Select2 chips may wrap awkwardly

Reported by: Antoine Lorence Owned by: Johannes Hoppe
Component: contrib.admin Version: 2.0
Severity: Normal Keywords:
Cc: Johannes Hoppe Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: yes

Description (last modified by Antoine Lorence)

Playing with the new Django 2.0 feature, Select2 widget in admin, I noticed a bad position of the last element of the first line in the input box itself. Please see the 3 little screenshots attached, each one correspond to a different browser (Firefox, Chrome, Opera).

The behavior seems related to the "clear" button added on the top-right of the input when at least 1 element has been added to the widget.

I do not paste models and admin code here, since it's probably irrelevant. Please ask if needed.

Attachments (3)

firefox_2017-10-06_08-52-32.png (10.2 KB) - added by Antoine Lorence 11 months ago.
Firefox screenshot example
chrome_2017-10-06_08-51-37.png (10.5 KB) - added by Antoine Lorence 11 months ago.
Chrome screenshot
opera_2017-10-06_08-48-42.png (12.8 KB) - added by Antoine Lorence 11 months ago.
Opera screenshot

Download all attachments as: .zip

Change History (10)

Changed 11 months ago by Antoine Lorence

Firefox screenshot example

Changed 11 months ago by Antoine Lorence

Chrome screenshot

Changed 11 months ago by Antoine Lorence

Opera screenshot

comment:1 Changed 11 months ago by Antoine Lorence

Description: modified (diff)

comment:2 Changed 10 months ago by Tim Graham

Cc: Johannes Hoppe added
Summary: Visual issue with Select2 input widgetSelect2 chips may wrap awkwardly
Triage Stage: UnreviewedAccepted

comment:3 Changed 10 months ago by Johannes Hoppe

Easy pickings: set
Owner: changed from nobody to Johannes Hoppe
Status: newassigned

Thank you Antoine! Good catch, that certainly looks wrong. I will check it out asap!

comment:4 Changed 10 months ago by Johannes Hoppe

Has patch: set

Antoine could you do me the favor and test my patch :)

comment:5 Changed 10 months ago by Antoine Lorence

I can confirm the patch fixed the floating issue on my model. Thanks !

https://i.imgur.com/DHmsCAq.png

comment:6 Changed 10 months ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 3a191bd:

Fixed #28685 -- Fixed awkward wrapping of Select2 chips.

comment:7 Changed 10 months ago by Tim Graham <timograham@…>

In 58252124:

[2.0.x] Fixed #28685 -- Fixed awkward wrapping of Select2 chips.

Backport of 3a191bd4abf9937e11504e66a7e5167910c0ab84 from master

Note: See TracTickets for help on using tickets.
Back to Top