Skip to content

Commit fd0e107

Browse files
authored
Merge pull request #495 from patrickbussmann/494_Fixed-Chrome-iFrame-Bug
Fixed bug with chrome browser and angular-gridster in iFrame - Fixed #494
2 parents d0618b3 + fe28af0 commit fd0e107

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/angular-gridster.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,7 @@
11911191
} else {
11921192
document.addEventListener('mousemove', doEvent, false);
11931193
document.addEventListener('mouseup', doEvent, false);
1194+
document.addEventListener('mouseleave', doEvent, false);
11941195
}
11951196
}
11961197
} else if (theEvtObj.type.match(/move$/i)) {
@@ -1213,7 +1214,7 @@
12131214
lastXYById[pointerId].x = pageX;
12141215
lastXYById[pointerId].y = pageY;
12151216
}
1216-
} else if (lastXYById[pointerId] && theEvtObj.type.match(/(up|end|cancel)$/i)) {
1217+
} else if (lastXYById[pointerId] && theEvtObj.type.match(/(up|end|cancel|leave)$/i)) {
12171218
// clause handles up/end/cancel
12181219

12191220
if (endEvent && prevent) {
@@ -1240,6 +1241,7 @@
12401241
} else {
12411242
document.removeEventListener('mousemove', doEvent, false);
12421243
document.removeEventListener('mouseup', doEvent, false);
1244+
document.removeEventListener('mouseleave', doEvent, false);
12431245
}
12441246
}
12451247
}

0 commit comments

Comments
 (0)