Permalink
Browse files

javascript lib MDL-23224 dropdown onclick event is not trigger in Chrome

  • Loading branch information...
1 parent c63ebd4 commit 1ede3cb37ffc744da99775570fb19beb69d2fc36 @mouneyrac mouneyrac committed Jan 5, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/javascript-static.js
@@ -365,7 +365,12 @@ M.util.init_select_autosubmit = function(Y, formid, selectid, nothing) {
// event.... usability
Y.on('key', processchange, select, 'press:13', form, select.get('selectedIndex'));
select.on('blur', processchange, form, select.get('selectedIndex'));
- select.on('click', processchange, form, select.get('selectedIndex'));
+ //little hack for chrome that need onChange event instead of onClick - see MDL-23224
+ if (Y.UA.webkit) {
+ select.on('change', processchange, form, select.get('selectedIndex'));
+ } else {
+ select.on('click', processchange, form, select.get('selectedIndex'));
+ }
}
}
});

0 comments on commit 1ede3cb

Please sign in to comment.