]> khamidou — GitHub mirrors - electron.git/commitdiff
Prevent overflow on webview with height: 100%
authorMal Graty <mal.graty@googlemail.com>
Sat, 21 Feb 2015 22:34:57 +0000 (22:34 +0000)
committerMal Graty <mal.graty@googlemail.com>
Sat, 21 Feb 2015 22:34:57 +0000 (22:34 +0000)
Without this, the object element gets displayed `inline` which in chromium means that it slightly exceeds it's bounds. Unfortunately there's no nice way to mitigate this issue as I can't find a way to get extra css into this intermediate page. However, forcing a block display solves the issue.

atom/renderer/lib/web-view/web-view.coffee

index 727a462d1ac63aa541ac721c62581808e443a04e..996ab176056af20fee9b7d9c990d8864d9b51a45 100644 (file)
@@ -186,6 +186,7 @@ registerBrowserPluginElement = ->
     @setAttribute 'type', 'application/browser-plugin'
     @setAttribute 'id', 'browser-plugin-' + getNextId()
     # The <object> node fills in the <webview> container.
+    @style.display = 'block'
     @style.width = '100%'
     @style.height = '100%'