From 9b0eeae2eb74352dc509a83039cb038c3e6047b5 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 8 Jul 2020 07:51:04 -0600 Subject: [PATCH] Clarify who is meant to use the polyfill --- src/@types/polyfill.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/@types/polyfill.ts b/src/@types/polyfill.ts index 816df7946d..3ce05d9c2f 100644 --- a/src/@types/polyfill.ts +++ b/src/@types/polyfill.ts @@ -14,8 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ +// This is intended to fix re-resizer because of its unguarded `instanceof TouchEvent` checks. export function polyfillTouchEvent() { - // Firefox doesn't have touch events, so create a fake one we can rely on lying about. + // Firefox doesn't have touch events without touch devices being present, so create a fake + // one we can rely on lying about. if (!window.TouchEvent) { // We have no intention of actually using this, so just lie. window.TouchEvent = class TouchEvent extends UIEvent {