mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
Horrible IE + jQuery hack to make the tests pass
This commit is contained in:
parent
1efef67b5f
commit
68217d427c
1 changed files with 8 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
@ -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);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue