@@ -46,9 +46,11 @@ describe('external drag and drop', function() {
46
46
$ ( '#sidebar .event1' ) . remove ( ) ;
47
47
$ ( '#cal' ) . fullCalendar ( 'next' ) ;
48
48
$ ( '#cal' ) . fullCalendar ( 'prev' ) ;
49
- $ ( '#sidebar .event2' ) . simulate ( 'drag-n-drop' , {
50
- dropTarget : getMonthCell ( 1 , 3 )
51
- } ) ;
49
+ setTimeout ( function ( ) { // needed for IE8
50
+ $ ( '#sidebar .event2' ) . simulate ( 'drag-n-drop' , {
51
+ dropTarget : getMonthCell ( 1 , 3 )
52
+ } ) ;
53
+ } , 0 ) ;
52
54
}
53
55
else if ( callCnt === 1 ) {
54
56
expect ( date ) . toEqualMoment ( '2014-08-06' ) ;
@@ -58,9 +60,11 @@ describe('external drag and drop', function() {
58
60
} ;
59
61
60
62
$ ( '#cal' ) . fullCalendar ( options ) ;
61
- $ ( '#sidebar .event1' ) . simulate ( 'drag-n-drop' , {
62
- dropTarget : getMonthCell ( 1 , 3 )
63
- } ) ;
63
+ setTimeout ( function ( ) { // needed for IE8
64
+ $ ( '#sidebar .event1' ) . simulate ( 'drag-n-drop' , {
65
+ dropTarget : getMonthCell ( 1 , 3 )
66
+ } ) ;
67
+ } , 0 ) ;
64
68
} ) ;
65
69
} ) ;
66
70
@@ -81,9 +85,11 @@ describe('external drag and drop', function() {
81
85
$ ( '#sidebar .event1' ) . remove ( ) ;
82
86
$ ( '#cal' ) . fullCalendar ( 'next' ) ;
83
87
$ ( '#cal' ) . fullCalendar ( 'prev' ) ;
84
- $ ( '#sidebar .event2' ) . simulate ( 'drag-n-drop' , {
85
- dropTarget : $ ( '.fc-slats tr:eq(2)' ) // middle is 1:00am on 2014-08-20
86
- } ) ;
88
+ setTimeout ( function ( ) { // needed for IE8, for firing the second time, for some reason
89
+ $ ( '#sidebar .event2' ) . simulate ( 'drag-n-drop' , {
90
+ dropTarget : $ ( '.fc-slats tr:eq(2)' ) // middle is 1:00am on 2014-08-20
91
+ } ) ;
92
+ } , 0 ) ;
87
93
}
88
94
else if ( callCnt === 1 ) {
89
95
expect ( date ) . toEqualMoment ( '2014-08-20T01:00:00' ) ;
@@ -93,9 +99,11 @@ describe('external drag and drop', function() {
93
99
} ;
94
100
95
101
$ ( '#cal' ) . fullCalendar ( options ) ;
96
- $ ( '#sidebar .event1' ) . simulate ( 'drag-n-drop' , {
97
- dropTarget : $ ( '.fc-slats tr:eq(2)' ) // middle is 1:00am on 2014-08-20
98
- } ) ;
102
+ setTimeout ( function ( ) { // needed for IE8
103
+ $ ( '#sidebar .event1' ) . simulate ( 'drag-n-drop' , {
104
+ dropTarget : $ ( '.fc-slats tr:eq(2)' ) // middle is 1:00am on 2014-08-20
105
+ } ) ;
106
+ } , 0 ) ;
99
107
} ) ;
100
108
101
109
it ( 'works with timezone as "local"' , function ( done ) { // for issue 2225
@@ -105,9 +113,11 @@ describe('external drag and drop', function() {
105
113
done ( ) ;
106
114
} ;
107
115
$ ( '#cal' ) . fullCalendar ( options ) ;
108
- $ ( '#sidebar .event1' ) . simulate ( 'drag-n-drop' , {
109
- dropTarget : $ ( '.fc-slats tr:eq(2)' ) // middle is 1:00am on 2014-08-20, LOCAL TIME
110
- } ) ;
116
+ setTimeout ( function ( ) { // needed for IE8
117
+ $ ( '#sidebar .event1' ) . simulate ( 'drag-n-drop' , {
118
+ dropTarget : $ ( '.fc-slats tr:eq(2)' ) // middle is 1:00am on 2014-08-20, LOCAL TIME
119
+ } ) ;
120
+ } , 0 ) ;
111
121
} ) ;
112
122
113
123
it ( 'works with timezone as "UTC"' , function ( done ) { // for issue 2225
@@ -117,9 +127,11 @@ describe('external drag and drop', function() {
117
127
done ( ) ;
118
128
} ;
119
129
$ ( '#cal' ) . fullCalendar ( options ) ;
120
- $ ( '#sidebar .event1' ) . simulate ( 'drag-n-drop' , {
121
- dropTarget : $ ( '.fc-slats tr:eq(2)' ) // middle is 1:00am on 2014-08-20, LOCAL TIME
122
- } ) ;
130
+ setTimeout ( function ( ) { // needed for IE8
131
+ $ ( '#sidebar .event1' ) . simulate ( 'drag-n-drop' , {
132
+ dropTarget : $ ( '.fc-slats tr:eq(2)' ) // middle is 1:00am on 2014-08-20, LOCAL TIME
133
+ } ) ;
134
+ } , 0 ) ;
123
135
} ) ;
124
136
} ) ;
125
137
0 commit comments