Skip to content

Commit

Permalink
Use node 8
Browse files Browse the repository at this point in the history
Note where the disabled attribute is defined for certain elements
  • Loading branch information
dfreedm committed May 10, 2018
1 parent 2bca0ee commit 28625d6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
sudo: false
dist: trusty
node_js: stable
node_js: 8
addons:
firefox: latest
chrome: stable
Expand Down
3 changes: 2 additions & 1 deletion lib/utils/gestures.html
Original file line number Diff line number Diff line change
Expand Up @@ -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<boolean>} */
const canBeDisabled = {
'button': true,
Expand Down Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion test/unit/gestures.html
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@
el.tapAll();
assert.deepEqual(el.taps, ['div']);
document.body.removeChild(el);
})
});
});
});
</script>
Expand Down

0 comments on commit 28625d6

Please sign in to comment.