diff --git a/src/mixins/canvas_events.mixin.js b/src/mixins/canvas_events.mixin.js index abdad5a86fd..a4e18c0818b 100644 --- a/src/mixins/canvas_events.mixin.js +++ b/src/mixins/canvas_events.mixin.js @@ -829,8 +829,13 @@ _fireOverOutEvents: function(target, e) { var _this = this, _hoveredTarget = this._hoveredTarget, _hoveredTargets = this._hoveredTargets, targets = this.targets, - diff = _hoveredTargets.length - targets.length; - [target].concat(targets, new Array(diff > 0 ? diff : 0).fill(null)).forEach(function(_target, index) { + diff = _hoveredTargets.length - targets.length, + diffArrayLength = diff > 0 ? diff : 0, + diffArray = []; + for (var i = 0; i < diffArrayLength; i++){ + diffArray.push(null); + } + [target].concat(targets, diffArray).forEach(function(_target, index) { _this.fireSyntheticInOutEvents(_target, e, { oldTarget: index === 0 ? _hoveredTarget : _hoveredTargets[index - 1], canvasEvtOut: 'mouse:out',