-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Carousel key events #14991
Comments
|
Although perhaps we ought to have Carousel's keyboard listener ignore keyboard events fired at (Even though I don't think we'd particularly recommend putting forms in carousels) |
yes I think the keyboard listener needs to ignore keyboard events fired from inputs and textarea. If i click outside the textbox the events don't fire, but as soon as I click inside the box and press the keys carousel will go crazy. PS: I think I am currently on 3.2.0 |
I actually have a very cool form-based wizard-like carousel, that's why the misfired key events |
I feel like this has come up before. The simplest solution is just to do this: $('#myCarousel').on('keydown', 'input', function(e) {
e.stopPropagation();
}); I don't think we should put a workaround for that in the core, since we don't advise to put anything else than text in carousels. |
We did not initiate the creation of carousel from javascript, and we do not use jquery (we use angularjs), so putting that line anywhere in our self-written javascript will incur massive scrutiny. Also from my pov, Carousel catching textbox and textarea events is a bug in Carousel itself |
The carousel was not designed for that purpose and therefore you will need to work around it in a inconvenient way. Anyhow, what do you mean by this:
If you are using https://github.com/angular-ui/bootstrap then you should open the issue with them since that codebase is completely decoupled from Bootstrap. |
If you're using Angular, then you should probably be using http://angular-ui.github.io/bootstrap/ or similar instead of Bootstrap's regular JS. |
no no no, our entire java base was written in angularjs, but carousel was using full-blown bootstrap.js. And using bootstrap.js already had me going through a full round of hurt for using jquery stuff. I am not using angular-ui. |
Hi, I have a little problem with Carousel key events.
Whenever the cursor is in a text-box on my slide and I press the left or arrow key, instead of the cursor moving between characters, Carousel will catch the event and move the slide next or prev. Taking out the Carousel keydown events from bootstrap.js solve the issue but I am not allowed to make direct changes to third party libraries.
Just wondering if this is a bug or not, and maybe the Carousel keydown events should be disabled by default because passing data-keyboard="false" does not work :(.
The text was updated successfully, but these errors were encountered: