Skip to content

Commit 4acf868

Browse files
authored
Merge pull request #2461 from plotly/ensure-visibility
throw an error if the test window is hidden
2 parents 64ec42c + 9fb85d4 commit 4acf868

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/jasmine/assets/mouse_event.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
var Lib = require('../../../src/lib');
22

33
module.exports = function(type, x, y, opts) {
4+
var visibility = document.visibilityState;
5+
if(visibility && visibility !== 'visible') {
6+
throw new Error('document.visibilityState = "' + visibility + '" - Please make the window visible.');
7+
}
8+
49
var fullOpts = {
510
bubbles: true,
611
clientX: x,

0 commit comments

Comments
 (0)