Pass window in to fix tests

This commit is contained in:
Daniel Imms
2022-05-23 07:23:15 -07:00
parent 8b53b8c255
commit ca083f257c
4 changed files with 19 additions and 10 deletions
+1 -1
View File
@@ -402,7 +402,7 @@ export class SelectionService extends Disposable implements ISelectionService {
* @param event The mouse event.
*/
private _getMouseEventScrollAmount(event: MouseEvent): number {
let offset = getCoordsRelativeToElement(event, this._screenElement)[1];
let offset = getCoordsRelativeToElement(window, event, this._screenElement)[1];
const terminalHeight = this._renderService.dimensions.canvasHeight;
if (offset >= 0 && offset <= terminalHeight) {
return 0;