Page MenuHomePhabricator

fix IE bug in mwsuggest.js os_eventKeydown where keycode is undefined
Closed, ResolvedPublic

Description

Author: mick

Description:
when other javascripts are included in a webpage that use event handlers, eg prototype.js,
os_eventKeydown does not work (for example the arrow keys) because the keycode is undefined.

Replacing the line in os_eventKeydown

os_cur_keypressed = (window.Event) ? e.which : e.keyCode;

with

if (undefined != e.keyCode)       
    os_cur_keypressed = e.keyCode;
else                              
    os_cur_keypressed = e.which;

You can see this modification in action at http://sesam.no/katalog/


Version: unspecified
Severity: major

Details

Reference
bz16529

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:26 PM
bzimport set Reference to bz16529.
bzimport added a subscriber: Unknown Object (MLST).