From 1e9be28d745394c998cc1992b942ed35646aa33c Mon Sep 17 00:00:00 2001 From: Jacob Reid Date: Tue, 5 Jan 2021 14:49:20 -0700 Subject: [PATCH] Fix SyntaxError Without the quotes in safari you get the following error: SyntaxError: The string did not match the expected pattern. --- lib/utils/gestures.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/gestures.js b/lib/utils/gestures.js index 8c5477d74..548b22865 100644 --- a/lib/utils/gestures.js +++ b/lib/utils/gestures.js @@ -147,7 +147,7 @@ function matchingLabels(el) { let root = el.getRootNode(); // if there is an id on `el`, check for all labels with a matching `for` attribute if (el.id) { - let matching = root.querySelectorAll(`label[for = ${el.id}]`); + let matching = root.querySelectorAll(`label[for = '${el.id}']`); for (let i = 0; i < matching.length; i++) { labels.push(/** @type {!HTMLLabelElement} */(matching[i])); }