Searching for a decision I found vue-focus directive. I installed it to my app and checking it on simple text input I see that it works ok. I tried to use it in carousel component as :
<carousel
v-show="hostelImages.length"
:centerMode="false"
:perPage="1"
:navigationEnabled="true"
paginationColor="#7e7e7e"
paginationPosition="bottom"
class="m-4"
zIndex= "100 !important"
>
<slide v-for="nextHostelImage, index in hostelImages" :key="nextHostelImage.id">
<img
:src="nextHostelImage.filenameData.image_url"
:alt="nextHostelImage.filename"
style="width:320px; height : auto; "
v-focus.lazy="true"
>
<p class="description-text pl-5 pr-5">
{{ nextHostelImage.info }}
</p>
</slide>
</carousel>
OR
<carousel
v-show="hostelImages.length"
:centerMode="false"
:perPage="1"
:navigationEnabled="true"
paginationColor="#7e7e7e"
paginationPosition="bottom"
class="m-4"
zIndex= "100 !important"
v-focus.lazy="true"
>
<slide v-for="nextHostelImage, index in hostelImages" :key="nextHostelImage.id">
<img
:src="nextHostelImage.filenameData.image_url"
:alt="nextHostelImage.filename"
style="width:320px; height : auto; "
>
<p class="description-text pl-5 pr-5">
{{ nextHostelImage.info }}
</p>
</slide>
</carousel>
But in both cases I do not see images on page opened.
-
If there is a way to simulate click of a mouse on carousel's image?
-
Testing in browser I noticed that when I change device in browse I see that my carousel's image becomes visible. Can that be decision for my problem ?