[Django] #29045: Multiple select widget does not honor size attribute

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Django] #29045: Multiple select widget does not honor size attribute

Django
#29045: Multiple select widget does not honor size attribute
-----------------------------------------+------------------------
               Reporter:  Jonah Bishop   |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  contrib.admin  |        Version:  1.11
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 I have an admin page set up for a model like so:

 {{{
 @admin.register(p_models.ScheduleType)
 class ScheduleTypeAdmin(admin.ModelAdmin):
     formfield_overrides = {
         models.ManyToManyField: {'widget':
 forms.SelectMultiple(attrs={'size': '30'})},
     }

     list_display = ('name',)
 }}}

 The resulting ManyToMany field has the **size** attribute set properly,
 but every browser I try only shows about 8 rows (not 30, as I instructed).
 I've cleared cache, and tried in multiple browsers (Chrome 63, Firefox
 57). My site uses Django 1.11.9.

--
Ticket URL: <https://code.djangoproject.com/ticket/29045>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/051.d29d1ee83951c82986e82eab2322aa2f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29045: Multiple select widget does not honor size attribute

Django
#29045: Multiple select widget does not honor size attribute
-------------------------------+--------------------------------------
     Reporter:  Jonah Bishop   |                    Owner:  nobody
         Type:  Bug            |                   Status:  new
    Component:  contrib.admin  |                  Version:  1.11
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Description changed by Jonah Bishop:

Old description:

> I have an admin page set up for a model like so:
>
> {{{
> @admin.register(p_models.ScheduleType)
> class ScheduleTypeAdmin(admin.ModelAdmin):
>     formfield_overrides = {
>         models.ManyToManyField: {'widget':
> forms.SelectMultiple(attrs={'size': '30'})},
>     }
>
>     list_display = ('name',)
> }}}
>
> The resulting ManyToMany field has the **size** attribute set properly,
> but every browser I try only shows about 8 rows (not 30, as I
> instructed). I've cleared cache, and tried in multiple browsers (Chrome
> 63, Firefox 57). My site uses Django 1.11.9.
New description:

 I have an admin page set up for a model like so:

 {{{
 @admin.register(p_models.ScheduleType)
 class ScheduleTypeAdmin(admin.ModelAdmin):
     formfield_overrides = {
         models.ManyToManyField: {'widget':
 forms.SelectMultiple(attrs={'size': '30'})},
     }

     list_display = ('name',)
 }}}

 The resulting ManyToMany field has the **size** attribute set properly,
 but every browser I try only shows about 8 rows (not 30, as I instructed).
 I've cleared cache, and tried in multiple browsers (Chrome 63, Firefox
 57). My site uses Django 1.11.9.

 It looks like the CSS style rules are overriding the **size** attribute.
 I'm guessing adding a **height: auto;** rule to the **select[multiple]**
 style set would fix it (it appears to do so in Chrome, at least).

--

--
Ticket URL: <https://code.djangoproject.com/ticket/29045#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.536813c8da7f97dd84864ea9ed158c4d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29045: admin CSS overrides Select/SelectMultiple size attribute (was: Multiple select widget does not honor size attribute)

Django
In reply to this post by Django
#29045: admin CSS overrides Select/SelectMultiple size attribute
-------------------------------+------------------------------------
     Reporter:  Jonah Bishop   |                    Owner:  nobody
         Type:  Bug            |                   Status:  new
    Component:  contrib.admin  |                  Version:  1.11
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+------------------------------------
Changes (by Tim Graham):

 * cc: elky (added)
 * stage:  Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/29045#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.3f9cc7f7bf2f7198c9c9dfe0bb22242b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29045: admin CSS overrides Select/SelectMultiple size attribute

Django
In reply to this post by Django
#29045: admin CSS overrides Select/SelectMultiple size attribute
-------------------------------+----------------------------------------
     Reporter:  Jonah Bishop   |                    Owner:  Anoosha keen
         Type:  Bug            |                   Status:  assigned
    Component:  contrib.admin  |                  Version:  1.11
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+----------------------------------------
Changes (by Anoosha keen):

 * owner:  nobody => Anoosha keen
 * status:  new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/29045#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.a46ef022b49edfc65ea7b2c15e7a4314%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29045: admin CSS overrides Select/SelectMultiple size attribute

Django
In reply to this post by Django
#29045: admin CSS overrides Select/SelectMultiple size attribute
-------------------------------+------------------------------------
     Reporter:  Jonah Bishop   |                    Owner:  (none)
         Type:  Bug            |                   Status:  new
    Component:  contrib.admin  |                  Version:  1.11
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+------------------------------------
Changes (by Anoosha keen):

 * owner:  Anoosha keen => (none)
 * status:  assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/29045#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.72ca0f1da6de0b46830daaa8db2ea3e9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29045: admin CSS overrides Select/SelectMultiple size attribute

Django
In reply to this post by Django
#29045: admin CSS overrides Select/SelectMultiple size attribute
-------------------------------+----------------------------------------
     Reporter:  Jonah Bishop   |                    Owner:  Jonah Bishop
         Type:  Bug            |                   Status:  assigned
    Component:  contrib.admin  |                  Version:  1.11
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+----------------------------------------
Changes (by Jonah Bishop):

 * owner:  nobody => Jonah Bishop
 * status:  new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/29045#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.6d5d33a572be70ef94003e97028cbade%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29045: admin CSS overrides Select/SelectMultiple size attribute

Django
In reply to this post by Django
#29045: admin CSS overrides Select/SelectMultiple size attribute
-------------------------------+----------------------------------------
     Reporter:  Jonah Bishop   |                    Owner:  Jonah Bishop
         Type:  Bug            |                   Status:  assigned
    Component:  contrib.admin  |                  Version:  1.11
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  1              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+----------------------------------------
Changes (by Jonah Bishop):

 * has_patch:  0 => 1


Comment:

 I've added a pull request (https://github.com/django/django/pull/10169)
 with a small patch to fix this issue. The fix was quite simple: a new
 "height: auto;" rule for the select[multiple] style case.

--
Ticket URL: <https://code.djangoproject.com/ticket/29045#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.4a000ba7ec5c98311dfa21582a363cff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29045: admin CSS overrides Select/SelectMultiple size attribute

Django
In reply to this post by Django
#29045: admin CSS overrides Select/SelectMultiple size attribute
-------------------------------+----------------------------------------
     Reporter:  Jonah Bishop   |                    Owner:  Jonah Bishop
         Type:  Bug            |                   Status:  closed
    Component:  contrib.admin  |                  Version:  1.11
     Severity:  Normal         |               Resolution:  fixed
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  1              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+----------------------------------------
Changes (by Tim Graham <timograham@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"263e03941187f4ffdd09b7e7ecee442717064083" 263e0394]:
 {{{
 #!CommitTicketReference repository=""
 revision="263e03941187f4ffdd09b7e7ecee442717064083"
 Fixed #29045 -- Fixed admin CSS so that select multiple elements honor the
 HTML size attribute.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29045#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.5a9594bc11a099b2dd0455c93f72c509%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.