WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 15 months ago

#10331 closed enhancement (fixed)

SELECT multiple="multiple" Size Bug

Reported by: GamerZ Owned by:
Milestone: 3.3 Priority: normal
Severity: normal Version: 2.9.2
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

In wp-admin.css line 430

#wpcontent select {
	padding: 2px;
	height: 2em;
	font-size: 11px;
}

We should remove the height, if not if a select element is set to multiple and size is set to 3, it will display as 1 element instead.

Attachments (4)

wp-admin.css.patch (284 bytes) - added by GamerZ 5 years ago.
admin.select.multiple.css (104.4 KB) - added by transom 4 years ago.
Add select[multiple] to admin css
admin.select.multiple.diff (104.4 KB) - added by transom 4 years ago.
Diff to add Select Multiple to Admin css
10331.patch (347 bytes) - added by SergeyBiryukov 3 years ago.

Download all attachments as: .zip

Change History (24)

comment:1 Denis-de-Bernardy5 years ago

  • Component changed from Formatting to UI
  • Severity changed from normal to major

comment:2 mrmist5 years ago

  • Keywords needs-patch added

GamerZ5 years ago

comment:3 GamerZ5 years ago

  • Keywords has-patch added; needs-patch removed

comment:4 azaozz4 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Multiple selects are not used in core and it seems this normalizes the <select> across browsers. If plugins need it they can easily add more specific style.

comment:5 christian_gnoth4 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened
  • Version changed from 2.8 to 2.9.2

hello,
please fix it. It took me a lot of time to find the error.

comment:6 ocean904 years ago

christian_gnoth: Why? Where we use multiple selects?

comment:7 nacin4 years ago

  • Milestone 2.9 deleted
  • Resolution set to invalid
  • Status changed from reopened to closed
  • Version changed from 2.9.2 to 2.8

Multiple selects are not used in core and it seems this normalizes the <select> across browsers. If plugins need it they can easily add more specific style.

comment:8 Denis-de-Bernardy4 years ago

Multiple selects are not used in core and it seems this normalizes the <select> across browsers. If plugins need it they can easily add more specific style.

It took me a lot of time to find the error.

As much as I agree with the reason it got closed, I can easily imagine a coder who isn't super proficient with WP or CSS spending needless amounts of time on this... This might deserve second thoughts.

comment:9 christian_gnoth4 years ago

  • Resolution invalid deleted
  • Severity changed from major to normal
  • Status changed from closed to reopened
  • Version changed from 2.8 to 2.9.2

hi,
apart from the last useless comment, I still ask you to change it.

I am working on a plugin and I am using a select with multiple options. As I did not used the developer tools like firebug I did not saw the css style definition and waste a lot of time.

So I can image, that everyone, who uses select with the size option will waste time on this problem.

I am using WP 2.9.2

comment:10 ocean904 years ago

  • Resolution set to invalid
  • Status changed from reopened to closed
  • Version changed from 2.9.2 to 2.8
I am working on a plugin

So you can easily overrite the CSS for your plugin.

As I did not used the developer tools like firebug

You should.

Two leading developers have close this ticket. Please leave it closed and don't waste their time. Thanks.

comment:11 christian_gnoth4 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Version changed from 2.8 to 2.9.2

hi,
thanks for your helpful answers.

Two leading developers could not solve this problem - I find difficult to belief.

I am not opening it - just for fun - please take this request seriously and solve it!!!

comment:12 nacin4 years ago

  • Keywords needs-patch added; has-patch removed
  • Milestone set to Future Release

I am open to a patch that maintains our cross-browser purposes solved by height:2em while allowing for select[multiple]. Maybe even if it's just select[multiple] { height: auto }.

Please don't just go re-open tickets multiple times though. I've decided to go with Denis' view here that if we can do something, we should. It's not that two lead developers don't know how to fix it, it's just that we aren't inclined to remove height:2em unless there is a viable cross-browser solution for making them look consistent when they are not multiple selects.

comment:13 transom4 years ago

  • Type changed from defect (bug) to enhancement

As this just bit me in the butt today, I thought I'd brave providing a patch.
I have added a a css2 level line that does the following:

#wpcontent select[multiple] { height: 10em; }

Obviously we can argue over the height but I think this addresses the concerns voiced above. Diff attached.

transom4 years ago

Add select[multiple] to admin css

comment:14 transom4 years ago

  • Keywords has-patch added; needs-patch removed

comment:15 Denis-de-Bernardy4 years ago

  • Milestone changed from Future Release to 3.1

Patch needs to be in diff format. Else +1 to the suggested fix.

If memory serves, an old browser would completely ignore the whole statement, but I'm not 100%. Can anyone confirm? (And potentially, commit?)

transom4 years ago

Diff to add Select Multiple to Admin css

comment:16 transom4 years ago

Idiot alert - it was a diff file that I mislabeled. same file added as diff

comment:17 azaozz3 years ago

I don't like the proposed patch for two reasons:

  • It's not compatible with all currently used browsers as Denis said above.
  • It "locks" the height of the <select multiple=.... What if the plugin author wants to set it to something else, i.e. multiple="3" or there are only 2-3 lines in it?

Still think it's better to leave this to the individual <select> elements, i.e. <select multiple="5" style="......

It also may be possible to drop the height=.. from the default stylesheet. It is intended to normalize the look of the select drop-downs across the currently used browsers but many of them have new versions out that may not need it any more.

comment:18 nacin3 years ago

  • Milestone changed from 3.1 to Future Release

SergeyBiryukov3 years ago

comment:19 SergeyBiryukov3 years ago

10331.patch adds height: auto; for select[multiple].

comment:20 helen15 months ago

  • Component changed from UI to Administration
  • Milestone changed from Future Release to 3.3
  • Resolution set to fixed
  • Status changed from reopened to closed

Got fixed in [18619].

Note: See TracTickets for help on using tickets.