Skip to content

Commit 8d8b111

Browse files
committed
Merge branch 'hotfix/ie9-calendarselect'
2 parents 6066ad7 + 2be79de commit 8d8b111

1 file changed

Lines changed: 19 additions & 4 deletions

File tree

src/client/extras/Sync.CalendarSelect.js

100644100755
Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -914,10 +914,25 @@ Extras.Sync.CalendarSelect = Core.extend(Echo.Render.ComponentSync, {
914914
Core.Web.Event.add(this._calendarDiv, "mouseout", Core.method(this, this._processDateRolloverExit), false);
915915

916916
this._updateMonthYearSelection();
917-
918-
Core.Web.Image.monitor(this._div, Core.method(this, function() {
919-
this._renderSizeUpdate();
920-
}));
917+
// This stuff handles the runaway recursion that happens in IE 9
918+
if (this._numMonitorRegistrations === undefined) {
919+
this._numMonitorRegistrations = 0;
920+
}
921+
922+
var registerMonitor = true;
923+
if ( (Core.Web.Env.BROWSER_INTERNET_EXPLORER && (Core.Web.Env.BROWSER_VERSION_MAJOR >= 9)) ) {
924+
if (this._numMonitorRegistrations > 1) {
925+
this._numMonitorRegistrations = 0;
926+
registerMonitor = false;
927+
}
928+
}
929+
930+
if (registerMonitor) {
931+
this._numMonitorRegistrations++;
932+
Core.Web.Image.monitor(this._div, Core.method(this, function() {
933+
this._renderSizeUpdate();
934+
}));
935+
}
921936
},
922937

923938
/** @see Echo.Render.ComponentSync#renderDispose */

0 commit comments

Comments
 (0)