dloughli — 2013-05-31T08:07:11-04:00 — #1
Any help or a workaround suggestion would be appreciated.
paul_wilkins — 2013-06-01T19:43:15-04:00 — #2
I find that when you click on the field, that it collapses the select option with the value that the keyboard selected. When you click on something else though or when you tab away, it goes back to the original unchanged value that there was before. So no change actually occurs when the list of options is collapsed.
However, when you press a character to select something and then press tab, then the onchange event occurs.
The problem occurs when someone presses a character to pre-select something and then manually collapses then list of options, right? It is expected for the onchange event to not occur when that happens.
dloughli — 2013-06-03T07:52:42-04:00 — #3
that is exactly what happens. The confusing part is that the user, when she clicks on the field, can think that they have in fact selected that value, and the div that normally gets replaced with different info with the onchange event, does not represent the info for the name that the user thought they have selected. Thanks for the reply, hopefully I can figure out a work around for this issue with google
paul_wilkins — 2013-06-03T17:07:41-04:00 — #4
The workaround is for the user to realise that closing the select list without choosing an option from the list, results in no option being selected. It's a useful UI element that allows you to not select something if you don't want to.
dloughli — 2013-06-04T18:19:44-04:00 — #5
I think the confusion comes from the fact, that the value in the element has changed, even though selection has not been made. Since few users are web developers, they would naturally think that they have selected a new value.
felgall — 2013-06-04T18:32:14-04:00 — #6
The value displayed on the single visible line has changed. The value selected has not changed. You will probably find that the selected entry if there is one is still highlighted if you expand the list out again and that the entry howing when the list is not expanded is NOT highlighted because it isn't selected.
dloughli — 2013-06-05T11:17:31-04:00 — #7
Am I the only one who thinks that is lousy design, to put a value in a field, even though you have not selected it? What value does that serve?
logic_ali — 2013-06-05T13:32:37-04:00 — #8
Ultimately what counts is the option displayed when the control loses focus. At that point any change will trigger the onchange event.
dloughli — 2013-06-06T05:47:38-04:00 — #9
I will have to respectfully disagree. What ultimately counts, is that a user of our web pages see something that makes sense. Having the situation where the user can type a letter, and a name pops into the field, and the user clicks that name (in the field, not in the dropdown), the drop down disappears, and the name remains in the field, but the info in the div is not representative of that name, but still contains the info from the previously selected name because the onchange event has not fired. At that point in time, the user will be looking at the page and would see the name they thought they had selected, but the div would have the info for the previously selected name. In the case of my web page, that div contains buttons, and if they clicked on one of them, it would take them to a different page for the selected student, which since the onchange event didn't fire, would not be for the student they thought they had selected. Complicated to explain I know, but I just think it is lousy design by Chrome. It doesn't happen this way in IE.
paul_wilkins — 2013-06-06T06:05:25-04:00 — #10
How many items are in the drop-down list, and how are they used?
logic_ali — 2013-06-06T08:38:28-04:00 — #11
It is a misleading form of operation albeit for what I consider is a very rare scenario. A mouse user is unlikely to select via keyboard. If you're stuck using <select>s, the best piece of crutchware I can devise is to blur all <select>s whenever the div in question is hovered. That will at least cause the current selection to be re-displayed. Specify the ID of your div as shown:
for( var i = 0, id; ( id = arguments[ i ] ); i++ )
lh( document.getElementById( id ) );
function boxBlur( )
var boxes = document.getElementsByTagName( 'SELECT' );
for( var i = 0, bx; ( bx = boxes[ i ] ); i++ )
function lh( elem )
elem.addEventListener ? elem.addEventListener( 'mouseover', boxBlur, false )
: elem.addEvent( 'onmouseover', boxBlur );
})( "theDiv" ); // <- Id of div to be hovered. Multiple IDs can be specified, separated by commas.
dloughli — 2013-06-06T15:46:50-04:00 — #12
I think you're right, I can't change Chrome.
The number of names in the drop down can vary up to thousands. I had originally developed my own autocomplete element for this field, but when the number of names in the drop down got very large, it started to get a little "funky" (how's that for a technical term, lol). I guess I'll just have to consider it a educational issue, where users will have to learn to not click in the field to close the dropdown when they see the name in it.
Thanks for your replies.