Skip to content

Commit

Permalink
Prevent scrollbar on screenshot
Browse files Browse the repository at this point in the history
closes #120
  • Loading branch information
meriadec committed Jun 9, 2017
1 parent 375ee99 commit 19d1d71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/takeScreenshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function takeScreenshot (html, deviceWidth) {
win.webContents.on('did-finish-load', () => {
// Window is not fully loaded after this event, hence setTimeout()...
win.webContents.executeJavaScript('document.querySelector(\'body\').getBoundingClientRect().height', (height) => {
win.setSize(deviceWidth, height)
win.setSize(deviceWidth, height + 50)
setTimeout(() => {
win.webContents.capturePage((img) => { // eslint-disable-line
win.close()
Expand Down

0 comments on commit 19d1d71

Please sign in to comment.