Skip to main content

Bug Tracker

Side navigation

#12356 closed bug (invalid)

Opened August 20, 2012 08:33PM UTC

Closed August 20, 2012 11:14PM UTC

Last modified August 20, 2012 11:16PM UTC

bootstrap typeahead doesn't work with jquery 1.8 in google chrome

Reported by: sandesh247@gmail.com Owned by: sandesh247@gmail.com
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.0
Keywords: Cc:
Blocked by: Blocking:
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

Attachments (0)
Change History (4)

Changed August 20, 2012 09:08PM UTC by dmethvin comment:1

owner: → sandesh247@gmail.com
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.

Changed August 20, 2012 10:54PM UTC by sandesh247@gmail.com comment:2

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.

Changed August 20, 2012 11:14PM UTC by dmethvin comment:3

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?

Changed August 20, 2012 11:16PM UTC by sandesh247@gmail.com comment:4

Sounds reasonable. Thanks!