Ticket #12356 (closed bug: invalid)
bootstrap typeahead doesn't work with jquery 1.8 in google chrome
| Reported by: | sandesh247@… | Owned by: | sandesh247@… |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.8.0 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Specifically, navigating the suggestions list with the up/down keys doesn't work.
fiddle: http://jsfiddle.net/dH5z5/
this works fine with jquery 1.7 .
corresponding bootstrap issue: https://github.com/twitter/bootstrap/issues/4465
Change History
comment:1 Changed 9 months ago by dmethvin
- Owner set to sandesh247@…
- Status changed from new to pending
comment:2 Changed 9 months ago by sandesh247@…
- Status changed from pending to new
(sorry about the x-post from the bootstrap ticket - there might be people here not following both bugs)
It still doesn't seem to work: http://jsfiddle.net/8NRyr/ . I have added a console.log(e) near the line , keypress: function (e) { - keypresses due to 'up' and 'down' keys still don't show up.
comment:3 Changed 9 months ago by dmethvin
- Status changed from new to closed
- Resolution set to invalid
The events are occuring in the keyup handler, for some reason they totally duplicated that code rather than attaching both events to the same handler.
Sorry, I wish I had more time to help you debug this but at this point it's a plugin issue until proven otherwise. It seems like the original code was never tested with IE6/7/8, it's possible there are other issues that just weren't worked out. Can you work with someone to debug this and open a more specific ticket if you determine there is a jQuery core bug?
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Looks like Bootstrap is using event.keyCode, which jQuery has never normalized. We used to copy it in 1.7 but that only caused more confusion because it wasn't present on oldIE and people would report that as a bug. To use the un-normalized value you can use event.originalEvent.keyCode although that won't work on oldIE for example.
The only key-related event data we've normalized is event.which as documented here: http://api.jquery.com/category/events/event-object/
Is this widget intended for use with oldIE? Bootstrap is in general so I'm not sure if this is an oversight or not.