nebulr / ui-swiper

Most modern mobile touch slider for angular js
MIT License
26 stars 25 forks source link

default swiper settings seem not to work #37

Closed tmuelli closed 4 years ago

tmuelli commented 5 years ago

I've got the problem, that some of the default values inside the swiper tag seem not to work. Especially the keyboardControl value, which is by default false, doesnt work properly. My intention is to disable the navigation with the keyboard arrows.

Here's my sample code:

<swiper instance="swipeInstance" keyboard-control="false" pagination-type="fraction" on-init="onInitSwiper">
    <slides>

        // some content ...

    </slides>
    <prev></prev>
    <next></next>
    <pagination></pagination>
</swiper>

However it is still possible to navigate with the arrow keys through the different slides. I'm pretty sure I'm missing something.

Thanks for help.

tmuelli commented 5 years ago

Well, I got my answer on my own. Apperently the problem was, that I've got an input field in every slide and when it was selected keyboard-control was possible, even though it was on false. When tabbing out of the input field or blur it, keyboard-control was disabled.

That looks pretty strange to me. So I would appreciate, if someone could explain this to me.

Thanks

acedigibits commented 4 years ago

Well, I got my answer on my own. Apperently the problem was, that I've got an input field in every slide and when it was selected keyboard-control was possible, even though it was on false. When tabbing out of the input field or blur it, keyboard-control was disabled.

That looks pretty strange to me. So I would appreciate, if someone could explain this to me.

Thanks

you cannot override keyboard controls for input. If you want input inside swiper use contentEditable on div instead of input tag.