Skip to content

Commit

Permalink
Fix tap issues on touch devices.
Browse files Browse the repository at this point in the history
  • Loading branch information
Saulis committed May 6, 2016
1 parent c9602c5 commit aff6bdd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data-table-row.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@
_onTap: function(e) {
// Prevent item selection if row itself is not focused. This means that
// an element inside the row has been focused.
if (!this.header && Polymer.dom(document.activeElement) !== Polymer.dom(this)) {
// Mobile devices don't move focus from body unless it's an input element that is focused, so this element will never get focused.
if (!this.header && document.activeElement !== document.body && Polymer.dom(document.activeElement) !== Polymer.dom(this)) {
e.stopPropagation();
} else if (this.rowDetailTemplate && this.detailsEnabled) {
this.expanded = !this.expanded;
Expand Down

0 comments on commit aff6bdd

Please sign in to comment.