I am facing an issue with my Bootstrap buttons setup. Here is an example:
<button :disabled="page === lastPage" type="button" class="btn btn-default" @click="getPage(lastPage)">
<span class="glyphicon glyphicon-forward"></span>
</button>
Interestingly, the first line in the getPage method seems to be ineffective:
event.target.blur();
Curiously, I have another button in a different component where event.target.blur() works perfectly:
<button class="btn btn-default pull-right" @click="show()" type="button">Batch
<span :class="{'glyphicon glyphicon-chevron-down': showForm, 'glyphicon glyphicon-chevron-up': !showForm}"></span>
</button>
Any idea why this discrepancy might exist?
UPDATE: It appears that the issue arises when clicking inside the SPAN element where the blur function does not work as expected.
UPDATE: Problem resolved - I also needed to include event.target.parentNode.blur()
for it to work properly.