Bug Tracker

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#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:
Blocked by: Blocking:


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 (4)

comment:1 Changed 7 years ago by dmethvin

Owner: set to sandesh247@…
Status: newpending

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.

comment:2 Changed 7 years ago by sandesh247@…

Status: pendingnew

(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 7 years ago by dmethvin

Resolution: invalid
Status: newclosed

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?

comment:4 Changed 7 years ago by sandesh247@…

Sounds reasonable. Thanks!

Note: See TracTickets for help on using tickets.