When I set `onclick` attribute using [jquery](https://jquery.com/), the method is getting called. This is happening only if I use tab key to trigger the link. When I click on the link, no issue occurs. Is this known bug? Please find the code snippet below. However I am not able to reproduce the issue in it and my code is exactly the same.

FYI, I am using jquery 3.1.1.

```js
function setDeleteLogo() {
  $('#deleteLogoBtn').attr('onclick', $('#confirmLink').attr('data-onclick'));
}

function deleteLogo() {
  alert();
}
```

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<a id="confirmLink" onclick="setDeleteLogo()" href="javascript:;" data-onclick="deleteLogo()">Confirm</a>

<button id="deleteLogoBtn">Yes, Delete</button>
```