-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
Have Carousel ignore keyboard events from <input>s or <textarea>s #14993
Conversation
-1 per #14991 (comment). |
That's a fair point. I can see the merits of both sides and will be happy with whatever fat decides. |
If we ultimately reject this, then we should document more explicitly that forms aren't supported in Carousels. |
Good point. |
@@ -42,6 +42,12 @@ | |||
} | |||
|
|||
Carousel.prototype.keydown = function (e) { | |||
var tagName = e.target.tagName.toUpperCase() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont need toUpperCase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would maybe just change this to
if (/INPUT|TEXTAREA/.test(e.target.tagName)) return
If we are considering merging this, it would be much easier to do it like this: if ($(e.target).is('input, textarea')) return // or
if (/input|textarea/i.test(e.target.tagName)) return |
|
Have Carousel ignore keyboard events from <input>s or <textarea>s
Fixes #14991.
/to @fat for review