When I try to open a drop-down, the window is too small for me to see any options. However, I know that the options do exist because they do appear when I use my arrow keys.
When I add size=10 to the select tag, like so:
<select size="10">
everything works fine. However this is not the interface I want.
What are the possibilities that could be causing this issue?
Related
I recently added a location search field on my site which shows suggestions based on what you type, but on Microsoft edge, a menu pops up on clicking on the input field. How can I disable this menu from appearing on just this input field of my site?
Based on the image you provided, I think this should be caused by some default settings in Edge. If you want to turn off this prompt, just navigate to: edge://settings/personalinfo in Edge and disable this feature like this image below:
I had today the same problem. I had input field without label and empty placeholder. Setting placeholder"..." and making the placeholder transparent makes that edge does not anymore offer "type / ..."
Hth
I believe what you're looking for is:
spellcheck="false" autocomplete="off" aria-autocomplete="none"
The aria-autocomplete seems to prevent that box from popping up and the spellcheck seems to also stop the spell checker one from displaying.
There are places where autocomplete and spellcheck would come in handy, but NOT in single-line fields like email, website, or an <input> where I have my own Bootstrap dropdown-menu/dropdown-item list that displays retrieved DB records via AJAX as the user types (in this case, the Edge popups were ovelaying my DropDown list).
Anyway, adding this code to the <input class="whatever" id="whatever" spellcheck="false" autocomplete="off" aria-autocomplete="none" placeholder="whatever" value="whatever" > seems to solve the issue and you don't have to get all your users to change the browser attributes or mess with the placeholder. Hope this helps... :)
I have a code fragment similar to this:
<select class="abcd" id="aaaa" />
<option selected>yes</option>
<option>no</option>
</select>
Firefox shows Yes as a default option when page loads.
But, same is not true with Chrome, and Safari. The select box shows up with a blank box and I have to click on the box to reveal the options and see what's the default one (Yes was chosen when the box is dropped down).
Can you please me understand if I'm missing some boolean argument here? Thanks!
? It actually seems to work as expected in chrome and IE (sorry don't have Safari handy).
Did you try looking with dev tools at the cascading and computed style rules? There might be a script or !important rule etc overriding your code.
If we use a simple HTML Select element:
<select>
<option>One</option>
<option>Two</option>
<option>Three</option>
<option>Four</option>
<option>Five</option>
<option>Six</option>
<option>Seven</option>
</select>
And view this element in IE10+ on a Windows 8 touch-enabled tablet, we find that when the user presses on the drop-down the list repeats, starting at the top of the list again. I understand this is the default functionality but I've been asked to disable it, and stop/snap to the last element. Despite my research and efforts I haven't been able to disable the repeating scroll.
I tried -ms-scroll-chaining but that didn't work (further found that it doesn't apply to my situation), per this link "-ms-scroll-chaining ...prevents the entire page from swiping when the scroll area is fully at one end." Other examples discuss XAML solutions (e.g., updating a combobox ItemPanelTemplate elements CarouselPanel to StackPanel) which doesn't help me because my issue is in an MVC web-page using HTML and CSS.
I think that such behavior is going to be expected by W8-touch users and it should not be prevented.
I doubt that there is an option just for that. If that really bothers you (or your client) you should be able to "solve it" by using javascript-based <select>-replacement solutions like Select2.
I don't know if this question is relevant, but it has become an issue at my workplace, so...
One of our clients (using a Mac) showed us a 'problem' in a dropdown that we made using the default <select> tag. The dropdown has 43 <option>'s. In our Windows PC, the dropdown has a scroll bar (as you can see in the screenshot) showing only some items at a time. But in the client's browser, the dropdown shows all the items at once.
Is there a way to have scroll bars on the dropdown on Mac PCs? If no, what possible alternatives can I apply to get rid of this issue? Please note that the dropdown uses HTML's default <select> and <option> tags and I am hoping not to use any jQuery plugins as an alternative.
Thanks :)
Edit: For reference, here's the website - http://webcityhome.com/client/aairportershuttle/reservation.php (On the Pickup Location, go to 'Pier' and select 'Pier no.') (link defunct)
This is the Windows screenshot in our PC -
And this is the Mac screenshot in the client's PC -
This is the normal, expected behavior of a dropdown list on OS X. OS X uses the entire available vertical space for the list, it does not restrict it to some arbitrary portion of the screen.
I'd tell your client politely to shove it. What he wants to do is alter the default behavior of standard OS provided controls. That's not the job of a website developer, and it's not an issue either. It'd be an issue to change it and provide all users with unexpected behavior.
Every single dropdown list in OS X works this way. Ask your client why it's only an issue on your site.
There does not seem to be a problem on Chrome or Safari on Mac OSX. Here is a screenshot.
It displays an arrow to scroll down that is activated on scroll or mouseover.
I'm unsure if this will actually work, but try adding this to your stylesheet:
select {
height:7em;
overflow:scroll;
}
Both the <select> and <option> tags can be stylized with CSS.
If you want to have a scroll bar, try adding a size attribute, e.g., <select size="20">.
I'm building a web page that will be viewed on mobile devices (Blackberry specifically). I have navigation drop down of sorts implemented as a <select> in the upper left corner of the page. Rather than require the user to click on the drop down directly I'd like to have so that the user can click/tap anywhere on the page the select drop down in the upper left corner opens. The page has no other links or clickable objects other than the select drop down in the upper left.
Is this even possible? From what I've found so far it seems that it's impossible to programmatically open a <select> drop down, but I figured I'd throw this specific case out there.
Since it's not possible to fake key presses with JavaScript (and rightfully so for security reasons), the closest thing is to change the size of the <select> element (change it from a drop down control to a list box control and back).
Demo, Code (pure JS, no library)
When the user selects an option by clicking (or tapping) it, the click event handler 'closes' the list box by setting its size back to 1, after which it converts back to a normal drop down control. I have only tested this in (non-mobile) Chrome, let me know if it works on Blackberry or not.
Edit:
I have created a small jQuery plugin that wraps behavior and configurability into a more comprehensible control. I have tested this on Safari Mobile on iOS 4 and it behaves just like a regular drop down does in that browser, except it can be opened programmatically.
Demo, Code (jQuery 1.7)
It works like this:
$("select").openable({ triggers: $("#trigger") });
Clicking on any trigger will open the selection UI.
I have also added a handler for the key up event to catch Enter, Esc and Space to 'close' the list box. This mimics the drop down control's selection mechanism on desktop browsers.
Of course, on a desktop browser this will change the layout of your page, as it's different from the native drop down control. You will have to come up with a CSS solution for that (something with position: absolute and z-index probably). But on iOS the selection UI isn't rendered on the page, so it's not a problem.
Again, haven't tested this plugin on BlackBerry...