jagthedrummer/codemirror-ui — pull request #15 by martajd (2012-07-24 18:36:36+00:00)
Title: Fix for IE7

IE7 will throw an error whenever you click any of the CodeMirrorUI buttons, because IE has an (of course) non-standard implementation of the event.target attribute. IE instead uses event.srcElement, but it can't even check for event.target being undefined because passing in events is borked too -- so we have to take the event from the window and overwrite the function event for IE, then check for it to be undefined. The behavior is unchanged for standards compliant browsers