Skip to content

setZoomLevel causes a webview to no longer fill the full page #7375

@bpasero

Description

@bpasero
  • Electron version: 1.3.7
  • Operating system: Mac OS

When you set the zoom level on the webframe that has a webview element, what the webview is showing no longer spans the full width of the page:

Without zoom:
screen shot 2016-09-28 at 07 36 43

With zoom:
image

HTML:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Hello World!</title>
    <script src="./index.js"></script>
  </head>
  <body>
    <webview src="http://www.github.com" id="foo" />
  </body>
</html>

JS:

setTimeout(function () {
    var webFrame = require('electron').webFrame;
    webFrame.setZoomLevel(1);
}, 2000);

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions