145
rated 0 times
[
152]
[
7]
/ answers: 1 / hits: 16008
/ 8 Years ago, mon, december 19, 2016, 12:00:00
I have a series of Bootstrap buttons like this:
<button :disabled=page === lastPage type=button class=btn btn-default @click=getPage(lastPage)>
<span class=glyphicon glyphicon-forward></span>
</button>
But the first line of the getPage method does not work:
event.target.blur();
Which is very strange, because I have another button in another component, on which event.taget.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>
Does anyone know why this might be?
EDIT: I think it's when I click inside the SPAN that the blur doesn't work.
EDIT: oh well I solved it - I also need event.target.parentNode.blur()
as well.
More From » vue.js