From 4e1f37fc177f637de18f7448c0fc597211bf79c2 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Thu, 3 Oct 2019 14:16:00 +0300 Subject: [PATCH] refactor(docs-infra): replace `mousewheel` event with `wheel` event (#32980) This commit replaces the non-standard, depecated [mousewheel][1] event (which is not supported in Firefox and possibly other browsers too) with the standard [wheel][2] event, which works on all supported browsers according to [MDN's compatibility table][3]. I manually tested it in Chrome, Firefox, Edge and IE11. [1]: https://developer.mozilla.org/en-US/docs/Web/API/Element/mousewheel_event [2]: https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event [3]: https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event#Browser_compatibility PR Close #32980 --- aio/src/app/app.component.html | 2 +- aio/src/app/app.component.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aio/src/app/app.component.html b/aio/src/app/app.component.html index 4ca82adc63..beac0b6bb8 100644 --- a/aio/src/app/app.component.html +++ b/aio/src/app/app.component.html @@ -57,7 +57,7 @@ -
+
diff --git a/aio/src/app/app.component.spec.ts b/aio/src/app/app.component.spec.ts index c7928ad7f5..2c15a491c4 100644 --- a/aio/src/app/app.component.spec.ts +++ b/aio/src/app/app.component.spec.ts @@ -667,7 +667,7 @@ describe('AppComponent', () => { it('should restrain scrolling inside the ToC container', () => { const restrainScrolling = spyOn(component, 'restrainScrolling'); - const evt = new MouseEvent('mousewheel'); + const evt = new WheelEvent('wheel'); setHasFloatingToc(true); expect(restrainScrolling).not.toHaveBeenCalled();