Ignore any events that bubble up to the document while testing.

Avoids triggering the browser's built-in "middle click to scroll" behavior when running specs.

reported by @bagnell