**Do you want to request a *feature* or report a *bug*?**

Report a bug.

**What is the current behavior?**

Global `window.event` is overwritten in React 16.5+ in development mode. Here're minimal repro steps:

- React **16.5.2 in dev mode**: https://jsfiddle.net/sergei_startsev/ecz103vL/2/

If you click the button, you see `DOMContentLoaded` event type.

**What is the expected behavior?**

The current behavior contradicts with specified behavior [window property event returns the Event which is **currently being handled** by the site's code. Outside the context of an event handler, the value is **always** `undefined`](https://developer.mozilla.org/en-US/docs/Web/API/Window/event). Moreover it works properly in production mode:

- React **16.5.2 in prod mode**: https://jsfiddle.net/sergei_startsev/st5L8e02/2/

It returns expected `click` event type.

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**

It works properly in React 16.4.2 and prod mode:

- React **16.4.2** in dev mode: https://jsfiddle.net/sergei_startsev/o26L08qw/

The issue is reproduced in Chrome 69. It works properly in FF 62 (`window.event` isn't support in 62, however it should be reproduced in FF 63 - it was recently added, see [details](https://developer.mozilla.org/en-US/docs/Web/API/Window/event#Browser_Compatibility)).

It seems that the issue was introduced by @ConradIrwin in #11696.
if (didError) {
        if (!didSetError) {
          
          error = new Error(
            'An error was thrown inside one of your components, but React ' +
              "doesn't know what it was. This is likely due to browser " +
              'flakiness. React does its best to preserve the "Pause on ' +
              'exceptions" behavior of the DevTools, which requires some ' +
              "DEV-mode only tricks. It's possible that these don't work in " +
              'your browser. Try triggering the error in production mode, ' +
              'or switching to a modern browser. If you suspect that this is ' +
              'actually an issue with React, please file an issue.',
          );
        } else if (isCrossOriginError) {
          error = new Error(
            "A cross-origin error was thrown. React doesn't have access to " +
              'the actual error object in development. ' +
              'See https:fb.me/react-crossorigin-error for more information.',
          );
        }
        this.onError(error);
      }
      
      window.removeEventListener('error', handleWindowError);
    };
    invokeGuardedCallbackImpl = invokeGuardedCallbackDev;
  }
}
export default invokeGuardedCallbackImpl;