Solved

HTML Select Not Displaying as Listbox in Safari Moble iPhone4s?

Posted on 2014-01-16
14
3,135 Views
Last Modified: 2014-01-22
I dev in .net, specifically C# MVC 4, and would like to know how to solve an issue concerning the html Select not displaying as a listbox using Safari Moble on my iPhone4s (ios 7.0.4)

Q. Will Safari mobile ever display the html Select correctly in future versions?

Q. Is the html Select not something Safari mobile is capable of rendering?

Note: Safari for Windows (5.1.7) does display the html Select correctly!
0
Comment
Question by:WorknHardr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 6
14 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39786248
In my code there has been no problem displaying and using a normal HTML <select> on iPhones or any other phones like Androids.  Show us the HTML from the view source of your page.
0
 

Author Comment

by:WorknHardr
ID: 39786751
Okay, here is the 'View Source' from Safari Mobile

    //using html 'select'
     <select name="sometext" multiple="multiple">
            <option value="1">text1</option>
            <option value="1">text2</option>
            <option value="1">text3</option>
     </select>

     //using Html.ListBox
     <select id="listbox1" name="listbox1" multiple="multiple">
            <option value="1">First item</option>
           <option value="2">Second item</option>
           <option value="3">Third item</option>
     </select>
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39786875
I get the same display in all browsers (Firefox, Chrome, and Safari on Mac) for that code.  It shows 4 rows and the items you show are the first three rows.  The fourth row is blank.
0
Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

 

Author Comment

by:WorknHardr
ID: 39787084
Try it in Safari mobile (iPhone)...
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39787102
All I have is emulators.  Do you have a screen shot?
0
 

Author Comment

by:WorknHardr
ID: 39787405
I'll post a pic soon as I figure-out how to get a screen-shot of my iPhone.

Also, downloaded and installed the 'Electric Mobile Studio' trial ($39.00) from here:
http://visualstudiogallery.msdn.microsoft.com/6bed5adb-1d6a-483d-9e22-ae0f88ec4477

I run my web app with the VS2012 'browse with' feature and it works fine in their emulator.
This still doesn't prove why the Safari mobile on iPhone 4s (ios 7.0.4) renders a ListBox as a DropDown.
0
 

Author Comment

by:WorknHardr
ID: 39787474
Here's the iPhone screenshot..

Note: even though the screenshot listbox says '0 items', I can still tap the listbox and select items just like a dropdown.

In case you've never done an iPhone screenshot:
https://discussions.apple.com/thread/3739872?tstart=0
iPhone-Listbox.png
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39787486
On other browsers, if you put more than 4 items in the list it becomes a drop down.  Although in Firefox it still displayed 4 lines with a scroll bar.  I guess that would be a 'scroll' down.
0
 

Author Comment

by:WorknHardr
ID: 39788181
Currently I have only 2 items in each of the top four listboxes. I think Safari mobile has a seriously bad bug.
0
 

Author Comment

by:WorknHardr
ID: 39788220
Chrome mobile doesn't render Listbox correctly either, same as Safari mobile.
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 250 total points
ID: 39789219
That makes it a Webkit mobile problem since Safari and Chrome are both based on Webkit.  I found that some people have created alternate methods and 'plugins' to use select multiple on those browsers.
0
 

Author Comment

by:WorknHardr
ID: 39789569
Webkit, found this link about 'appearance' and 'listbox'
http://www.paulund.co.uk/changing-appearance-of-element-with-css

I tried this css, and not work either to change look

[styleshteet]
.listboxx {
        -webkit-appearance:listbox;
        -moz-appearance:listbox;
    }

[view]
 <select name="sometext" multiple="multiple" class = "listboxx">
                    <option value="1" selected="selected">text1</option>
                    <option value="1">text2</option>
                    <option value="1">text3</option>
                </select>
0
 

Author Closing Comment

by:WorknHardr
ID: 39801330
I still don't have a good solution, thanks for helping me this far, I think we're fighting browser-bug...
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39801750
Glad to help, I think you're probably right.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of new and distinct gadgets are making their appearance every other day. The latest gadget that has wooed the attention of all gadget lovers and non gadget lovers alike is the Smartwatch. This tiny gadget is capable of offering live access to …
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question