Skip to content

Commit

Permalink
dash-preview: move mouse outside page to prevent hovering on
Browse files Browse the repository at this point in the history
figures
  • Loading branch information
antoinerg committed Dec 18, 2019
1 parent a78a100 commit 22032a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/component/plotly-dash-preview/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ function render (info, opts, sendToMain) {
})

loaded().then(() => {
// Move mouse outside the page to prevent hovering on figures
contents.sendInputEvent({ type: 'mouseMove', x: -1, y: -1 })
contents.printToPDF(info.pdfOptions, (err, pdfData) => {
if (err) {
done(525)
Expand Down
1 change: 1 addition & 0 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function createMockWindow (opts = {}) {

webContents.executeJavaScript = sinon.stub()
webContents.printToPDF = sinon.stub()
webContents.sendInputEvent = sinon.stub()
webContents.session = sinon.stub()
webContents.session.clearStorageData = sinon.stub()

Expand Down

0 comments on commit 22032a4

Please sign in to comment.