#6873 closed (wontfix)
Make rendering of SelectMultiple consistent across browsers
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Design decision needed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
At the moment the SelectMultiple widget renders without a size attribute. This is ok in Firefox as this browser simply increases the number of visible lines to match the actual number of choices till it reaches 21 or so. IE7 simply displays 4 lines regardless of the number of choices. Opera uses one line by default. Needless to say this makes the widget even more unusable than it is anyway. One has to scroll and then ctrl+click.
The attached patch changes the render() function to add a size attribute by default that is equal to the number of choices but smaller than 10. Making the display (and usability) equal on all browsers.
The place where this is the biggest problem for me at the moment is the multiple select widget for user groups in the admin. But I believe this is a general problem with the SelectMultiple widget.
Attachments (4)
Change History (10)
by , 17 years ago
Attachment: | SelectMultiple-default-size-00.diff added |
---|
comment:1 by , 17 years ago
While running the tests for forms I get the following error on my system. No idea where it comes from :( But it seems to be triggered by the patch on widgets.py
ERROR: Doctest: regressiontests.forms.tests.__test__.widgets_tests ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/test/_doctest.py", line 2174, in runTest failures, tries = runner.run( File "/usr/lib/python2.4/site-packages/django/test/_doctest.py", line 1403, in run return self.__run(test, compileflags, out) File "/usr/lib/python2.4/site-packages/django/test/_doctest.py", line 1316, in __run self.report_failure(out, test, example, got) File "/usr/lib/python2.4/site-packages/django/test/_doctest.py", line 1183, in report_failure out(self._failure_header(test, example) + UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 249: ordinal not in range(128)
by , 17 years ago
Attachment: | SelectMultiple-default-size-01.diff added |
---|
More test fixes, minimum size of one
comment:2 by , 17 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
I'm not sure if it's django's job to overcome browser limitations altought it seems reasonable, please try to bring this into django-developers for discussion.
by , 16 years ago
Attachment: | SelectMultiple-default-size-02.diff added |
---|
Updated to r8287, tests still fail with UnicodeDecodeError
comment:4 by , 16 years ago
milestone: | → post-1.0 |
---|
comment:5 by , 16 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Opera is usable in the latest version. And who wants to use SelectMultiple anyway :)
First shot at adding a default size to SelectMultiple, includes test changes