Skip to content

Commit

Permalink
fix(data-table): fixes click row error in firefox (#692) (#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
rlloyd2001 authored and emoralesb05 committed Jun 27, 2017
1 parent 96a102d commit c0da661
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/platform/core/data-table/data-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,9 @@ export class TdDataTableComponent implements ControlValueAccessor, AfterContentI
if (this.isClickable) {
// ignoring linting rules here because attribute it actually null or not there
// can't check for undefined
const srcElement: any = event.srcElement || event.currentTarget;
/* tslint:disable-next-line */
if (event.srcElement.getAttribute('stopRowClick') === null) {
if (srcElement.getAttribute('stopRowClick') === null) {
this.onRowClick.emit({row: row});
}
}
Expand Down Expand Up @@ -480,8 +481,8 @@ export class TdDataTableComponent implements ControlValueAccessor, AfterContentI
if (this._lastArrowKeyDirection === TdDataTableArrowKeyDirection.Descending) {
index++;
}
/**
* if users presses the up arrow, we focus the prev row
/**
* if users presses the up arrow, we focus the prev row
* unless its the first row, then we move to the last row
*/
if (index === 0) {
Expand All @@ -506,8 +507,8 @@ export class TdDataTableComponent implements ControlValueAccessor, AfterContentI
if (this._lastArrowKeyDirection === TdDataTableArrowKeyDirection.Ascending) {
index--;
}
/**
* if users presses the down arrow, we focus the next row
/**
* if users presses the down arrow, we focus the next row
* unless its the last row, then we move to the first row
*/
if (index === (length - 1)) {
Expand Down

0 comments on commit c0da661

Please sign in to comment.