Permalink
Browse files

Lib MDL-22518 Group selector dropdowns destroy accessibility

  • Loading branch information...
1 parent fb8d8ca commit 4d16b11a389bc497adc272a82b48c6f939c52ccb @sammarshallou sammarshallou committed May 19, 2010
Showing with 2 additions and 9 deletions.
  1. +2 −9 lib/dropdown.js
View
@@ -32,7 +32,7 @@ function initSelect(formId,targetWindow)
theSelect.changed = false;
- selectFocussed();
+ theSelect.initValue = theSelect.value;
theSelect.onchange = selectChanged;
theSelect.onkeydown = selectKeyed;
@@ -70,13 +70,6 @@ function selectClicked()
this.changed = true;
}
-function selectFocussed()
-{
- this.initValue = this.value;
-
- return true;
-}
-
//we keep Firefox behaviors: onchange is fired when we press "Enter", "Esc", or "Tab"" keys.
//note that is probably not working on Mac (keyCode could be different)
function selectKeyed(e)
@@ -94,7 +87,7 @@ function selectKeyed(e)
{
theEvent = event;
}
-
+
if ((theEvent.keyCode == keyCodeEnter || theEvent.keyCode == keyCodeTab) && this.value != this.initValue)
{
this.changed = true;

0 comments on commit 4d16b11

Please sign in to comment.