daniel-nagy / md-data-table

Material Design Data Table for Angular Material
MIT License
1.9k stars 520 forks source link

How to remove the blue line made by ng-click #582

Closed waitingduck closed 7 years ago

waitingduck commented 7 years ago

Hi,

I would like to know is it possible to remove the blue line made by ng-click because this blue line render not as expected. I cannot reproduce it on your demo, but maybe is similar to the result when you double click the row and the left and right line will disappear(in live demo).

After add ng-click to \<tr>. It shows blue line when you click the row. screen shot 2017-04-20 at 3 40 01 pm If you double click, left and right line disappear. screen shot 2017-04-20 at 3 40 09 pm

Mine is worse, it some time looks like this screen shot 2017-04-20 at 3 40 56 pm or screen shot 2017-04-20 at 3 41 04 pm

Here is my code

<md-table-container>
  <table md-table md-row-select="true">
    <thead md-head md-order="myOrder.order">
    <tr md-row>
      <th md-column ng-repeat="(index, col) in requestTable.data.header"
          md-order-by="{{requestTable.data.keys[index]}}">{{col}}
      </th>
    </tr>
    </thead>
    <tbody md-body>
    <tr md-row ng-repeat="data in requestTable.data.data | orderBy: myOrder.order" ng-click="">
      <td md-cell ng-repeat="col in requestTable.data.keys" >{{data[col]}}</td>
    </tr>
    </tbody>
  </table>
</md-table-container>

Not sure what happened here. So my first thought is to disable the blue line. Any suggestion is welcome.

Thanks.

ielektronick commented 7 years ago

Hi @waitingduck The issue is completely CSS. :) So, I assume you're using Chrome. Chrome adds outline styles for focused elements depending device (mobile or desktop). Please take a look: 2017-04-21 09_40_16-cphdev7 - remote desktop connection And in computed: 2017-04-21 09_40_45-cphdev7 - remote desktop connection To fix that just add:

tr.md-row:focus {
    outline: none;
}

PROFIT :1st_place_medal:

waitingduck commented 7 years ago

Hi @ielektronick

That's a good suggestion and fix my problem. But wondering do you know why is that happen?

Thanks!

AntonisFK commented 7 years ago

@waitingduck Its a default browser outline its supposed to help keyboard users and users with reduced vision where there currently are on the page.

waitingduck commented 7 years ago

I see. Thank you @AntonisFK and @ielektronick. Problem solved:)