Hi, Isomorphic,
We've logged one strange error in browser and find out that sc.StretchImg.inWhichPart() don't check undefined conditions in:
Tested on SmartClient 10.1p 2019-02-13 (version) older also affected.
We've logged one strange error in browser and find out that sc.StretchImg.inWhichPart() don't check undefined conditions in:
Code:
inWhichPart : function () {
if (this.vertical) {
var num = this.inWhichPosition(this._imgSizes, this.getOffsetY());
} else {
var direction = (this.ignoreRTL || !this.isRTL()) ? isc.Canvas.LTR : isc.Canvas.RTL;
var num = this.inWhichPosition(this._imgSizes, this.getOffsetX(), direction);
}
var item = this.items[num];
// If the TabSet includes an "emptyButton" between the ScrollerForwardImg and the
// ScrollerBackImg we need to take it into account, as the emptyButton is not a valid
// target for inWhichPart(). So, if the cursor is in the emptyButton, we will return the
// next item in the scroller, that will be the ScrollerBackImg.
if (item.name == "emptyButton") item = this.items[num+1]; // <- HERE if item is undefined then exception is thrown during property access "name" on undefined.
return (item ? item.name : null); // <- HERE seems checking is done after property access should be done before.
}
Comment