Skip to content

Commit

Permalink
Horrible IE + jQuery hack to make the tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
mhevery committed Oct 22, 2010
1 parent 1efef67 commit 68217d4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/scenario/Scenario.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,13 @@ function browserTrigger(element, type) {
case 'checkbox':
element.checked = !element.checked;
break;
case 'text':
case 'textarea':
case 'password':
// TODO: FIX THIS HACK
// for some reason on IE 'change' event does not fire in
// jQuery but keyup does. So we are hacking it!
type = 'keyup';
}
element.fireEvent('on' + type);
} else {
Expand All @@ -214,7 +221,7 @@ function browserTrigger(element, type) {
(function(fn){
var parentTrigger = fn.trigger;
fn.trigger = function(type) {
if (/(click|change)/.test(type)) {
if (/(click|change|keyup)/.test(type)) {
return this.each(function(index, node) {
browserTrigger(node, type);
});
Expand Down

0 comments on commit 68217d4

Please sign in to comment.