The problematic scenario is:
1. I click a button to trigger a modal
2. The `show.bs.modal` event gets prevented by some code, so the modal doesn't get shown.
3. I click a different button that triggers the same modal.
4. The modal gets successfully shown.

Now when I close the modal, we want the latter button to get refocused (and it'd be best not to have the focus jump around multiple times unnecessarily). Hence, this `if` statement.