Skip to content

Commit

Permalink
remove wrong reference to event property and opt for Event
Browse files Browse the repository at this point in the history
  • Loading branch information
AtofStryker committed Jul 15, 2022
1 parent 5143ee5 commit 5257d7e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/driver/src/cy/commands/screenshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,7 @@ const scrollOverrides = (win: Window, doc: Document) => {
// and don't want the page size to change once we start
// https://github.com/cypress-io/cypress/issues/6099

// Window.Event is private and also deprecated. See https://developer.mozilla.org/en-US/docs/Web/API/Window/event.
// @ts-ignore
win.dispatchEvent(new win.Event('scroll'))
win.dispatchEvent(new Event('scroll'))

return () => {
doc.documentElement.style.overflow = originalOverflow
Expand Down

0 comments on commit 5257d7e

Please sign in to comment.