Skip to content

Commit

Permalink
Fix webviews
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustem Mussabekov committed Dec 15, 2020
1 parent 17913d8 commit 3a1a014
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Raindrop.io",
"productName": "Raindrop.io",
"version": "5.2.47",
"version": "5.2.48",
"description": "Crossplatform bookmarking app",
"main": "src/index.js",
"repository": {
Expand Down Expand Up @@ -39,7 +39,7 @@
"@electron-forge/maker-squirrel": "6.0.0-beta.52",
"@electron-forge/maker-zip": "6.0.0-beta.52",
"@electron-forge/publisher-github": "6.0.0-beta.52",
"electron": "11.1.x",
"electron": "10.2.x",
"shx": "^0.3.2"
}
}
5 changes: 2 additions & 3 deletions src/contextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ const isDev = require('electron-is-dev')
const contextMenu = require('electron-context-menu')

module.exports = function() {
app.on('web-contents-created', (e, win) => {
app.on('web-contents-created', (e, window) => {
contextMenu({
//instead of just window: win there is fix for electron 11
window: win.getType && win.getType() == 'webview' ? win : win.webContents || (win.getWebContentsId && remote.webContents.fromId(win.getWebContentsId())),
window,
showCopyImageAddress: true,
showSaveImageAs: true,
showServices: true,
Expand Down
1 change: 1 addition & 0 deletions src/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class Window {

//security
plugins: true,
contextIsolation: true,
webPreferences: {
nodeIntegration: false,
webviewTag: true,
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1296,10 +1296,10 @@ electron-winstaller@^4.0.0:
lodash.template "^4.2.2"
temp "^0.9.0"

electron@11.1.x:
version "11.1.0"
resolved "https://registry.yarnpkg.com/electron/-/electron-11.1.0.tgz#8dfdf579d1eb79feef3e3d2937fc022e72129c90"
integrity sha512-RFAhR/852VMaRd9NSe7jprwSoG9dLc6u1GwnqRWg+/3cy/8Zrwt1Betw1lXiZH7hGuB9K2cqju83Xv5Pq5ZSGA==
electron@10.2.x:
version "10.2.0"
resolved "https://registry.yarnpkg.com/electron/-/electron-10.2.0.tgz#4b00f0907b28aca4b93661bb53ce9a4f8ad32201"
integrity sha512-GBUyq8dwUqXPkCTkoID+eZ5Pm9GFlLUd2eSoGe8UOaHeW68SgCf5t75/uGHraQ1OIz/0qniyH5M4ebWEHGppyQ==
dependencies:
"@electron/get" "^1.0.1"
"@types/node" "^12.0.12"
Expand Down

0 comments on commit 3a1a014

Please sign in to comment.