Changes between Version 1 and Version 3 of Ticket #36336
- Timestamp:
- Apr 21, 2025, 6:54:56 PM (5 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #36336
- Property Summary Incorrect size of first autocomple in Inlines with "collapsed" class → Incorrect size of first autocomple in Inlines with "collapsed" class (on chromium based browsers?)
-
Ticket #36336 – Description
v1 v3 1 1 This error occurs on versions after removing the "collapse.js" and moving to <details> and <summary> tags, mainly Django>=5.1 and in my opinion is purely JS/CSS related and Python independent. This happens using both `StackedInline` and `TabularInline`. 2 2 3 Tested on Google Chrome, Firefox, Edge, Brave and Safari, but with inconsistnt results, seems like the **problems is ''mainly'' on desktop**, but also on mobile devides when using desktop mode with sidebar open (I know how it sounds, but it might be caused by some element width checking). 3 Tested on Google Chrome (135.0.7049.96), Edge (135.0.3179.85), Brave (1.77.100), but with inconsistnt results, seems like the **problems is mainly on desktop**, but also on mobile devides most consistently when using desktop mode with sidebar open (I know how it sounds, but it might be caused by some element width checking). 4 Sometimes it happens after refresh (1st gif) and sometimes from the start (2nd gif). 4 5 5 Desktop: 6 [[Image(https://raw.githubusercontent.com/michalpokusa/static-django-tickets/refs/heads/main/36336/2025-04-19%2011%2017%2043.png)]] 6 I identified the problem is with `width: auto;` instead of e.g. `width: 260px;` on `<span class="select2 select2-container select2-container--admin-autocomplete">` set by `Select2.prototype._resolveWidth`. 7 https://github.com/django/django/blob/1831f7733d3ef03d1ca7fac3e8d9f4c5e3e3375e/django/contrib/admin/static/admin/js/vendor/select2/select2.full.js#L5496 7 8 8 Mobile (Chrome): 9 [[Image(https://raw.githubusercontent.com/michalpokusa/static-django-tickets/refs/heads/main/36336/Screenshot_20250419_113946_Chrome.png)]] 10 [[Image(https://raw.githubusercontent.com/michalpokusa/static-django-tickets/refs/heads/main/36336/Screenshot_20250419_114010_Chrome.png)]] 9 [[Image(https://raw.githubusercontent.com/michalpokusa/static-django-tickets/refs/heads/main/36336/2025-04-22%2000%2048%2015.gif)]] 10 [[Image(https://raw.githubusercontent.com/michalpokusa/static-django-tickets/refs/heads/main/36336/2025-04-22%2000%2051%2030.gif)]] 11 11 12 Steps to reproduce: 12 I have successfully reproduces using Django 5.2 on Windows 11, on multiple browsers, on two separate devices, one with 2560x1440 and one with 1920x1080, in both windowed and fullscreen modes. I even tested hosting project on both Windows and Linux, no changes, but as mentioned above, it seems to be purely frontend related issue. 13 14 After updating Firefox I am unable to reproduce, I do not know which version I used before, and at this point I am not sure whether there was a problem before, right now it seems it is only affecting chromium based browsers. 15 16 No model instances have to be created, it doesn't matter whether user is editing existing object or adding a new one. 17 18 Code: 13 19 == models.py 14 20 {{{#!python