Your if clause seems dubious... Is "if (this._pendingScrollY)" not more appropriate? For example, if this._pendingScrollY were 0, wouldn't "if (this._pendingScrollY)" still be what you want?