diff --git a/.travis.yml b/.travis.yml index 1fb368be41..475a17ebbd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js sudo: false dist: trusty -node_js: stable +node_js: 8 addons: firefox: latest chrome: stable diff --git a/lib/utils/gestures.html b/lib/utils/gestures.html index a948ac3a7e..04a7c58b32 100644 --- a/lib/utils/gestures.html +++ b/lib/utils/gestures.html @@ -113,6 +113,7 @@ 'select': true }; + // Defined at https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#enabling-and-disabling-form-controls:-the-disabled-attribute /** @type {!Object} */ const canBeDisabled = { 'button': true, @@ -1071,7 +1072,7 @@ let dy = Math.abs(e.clientY - this.info.y); // find original target from `preventer` for TouchEvents, or `e` for MouseEvents let t = Gestures._findOriginalTarget(/** @type {Event} */(preventer || e)); - if (!t || (canBeDisabled[t.localName] && t.disabled)) { + if (!t || (canBeDisabled[/** @type {!HTMLElement} */(t).localName] && t.disabled)) { return; } // dx,dy can be NaN if `click` has been simulated and there was no `down` for `start` diff --git a/test/unit/gestures.html b/test/unit/gestures.html index a691526bea..f3734356f9 100644 --- a/test/unit/gestures.html +++ b/test/unit/gestures.html @@ -692,7 +692,7 @@ el.tapAll(); assert.deepEqual(el.taps, ['div']); document.body.removeChild(el); - }) + }); }); });