* (bug 16529) Fix for search suggestions with some third-party JS libraries
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 3 Dec 2008 00:00:20 +0000 (00:00 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 3 Dec 2008 00:00:20 +0000 (00:00 +0000)
commit2135c34e1d70b4c2759b80e64d0db143d0b37f19
tree965011062b8225e3cdd2458efa14f99c04dc5ab8
parent8fafb027a2bcc670b32dd5129a2ff2bc45df1886
* (bug 16529) Fix for search suggestions with some third-party JS libraries

Per bug "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."

The check for window.Event seems to be for ancient Netscape 4.x stuff and might not be totally necessary... but at least checking for the *actual* thing wanted (e.keyCode vs e.which) is less prone to false positives.

(A third party JS library might create an Event class which would override the window.Event property and generally muck things up; on IE the previous check would then cause an attempt to read the key code from e.which which doesn't exist on IE.)
RELEASE-NOTES
skins/common/mwsuggest.js