The community Taskforce initiative has now come to a close.
Thanks to everyone who made thoughtful and genuine contributions to the website.
All submissions will be kept publically available for the forseeable future for reference purposes.

This website is part of the community Taskforce initiative

Submission details

-5 +5/-10 votes

Safari is not following HTML Select tag properly

Submitted by hem.acharya on September 12, 2008 to Bug

HTML Select tag has attribut size but Safari displays 4 item without caring how many visible item size is configured ( eg <select name="example" size="2" > will display 4 options )

MOre on this here http://macphobia.com/safari-fails-to-obey-the-html-tag.macphobia

NO solution .

Medium

Medium

Not fixed

Discussion (3 comments)

abitgone wrote on September 12, 2008, 10:29am

Is this the right website to be filing bugs for WebKit (the browser engine that Safari uses)? The same 'bug' is present in every WebKit-powered browser. Safari, Chrome, Adobe AIR applications... so this isn't really Safari-specific.

From the HTML 4.01 spec:

size = number [CN]
If a SELECT element is presented as a scrolled list box, this attribute specifies the number of rows in the list that --should-- be visible at the same time. Visual user agents are --not required-- to present a SELECT element as a list box; they may use any other mechanism, such as a drop-down menu.

The specification uses the phrases "should" and "not required", which means "doesn't have to". If the HTML specification were to use "must" or "required", then the user-agent has to follow the rules in order to be on-specification.

In any case, as a web developer/designer, you should be using CSS to specify the size of elements on the page instead of using mark-up to achieve this. Seperation of presentation from content is the way forward.

hem.acharya wrote on September 12, 2008, 7:28pm

Anyways how can css be used to specify the size of Select HTML tag and how the output is generated.. any reference .. ? and all other browsers are displaying correctly why Safari or Webkit based browsers should stand out in this case?

ebaur wrote on September 13, 2008, 5:38am

The reasoning for this, as I understand it, is to maintain UI consistency in the OS. If the list was only two lines, there wouldn't be sufficient space for the arrows and the scrollbar on the side of the list box. Since the HTML spec is somewhat vague on what is *required* they probably considered it best to err on the side of a more consistent UI.

I wonder what you're doing that you're insisting only two lines. I suspect your UI could be better designed if that's what you're trying to do.

hem.acharya wrote on September 25, 2008, 3:25pm

Changed problem description.

You might also be interested in...