diff --git a/pd/nw/pd_canvas.html b/pd/nw/pd_canvas.html
index fa8b401dcd45c3f70a6348cda98f517beff92e7a..e9ff81e74e21d0f48f9f5e9c9303a8cad54446c3 100644
--- a/pd/nw/pd_canvas.html
+++ b/pd/nw/pd_canvas.html
@@ -10,7 +10,7 @@
   <input style="display:none;" id="openpanel_dialog" type="file" />
   <input style="display:none;" id="savepanel_dialog" type="file" nwsaveas nwworkingdir />
 
-  <svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="patchsvg" height="1000" width="1000" overflow="visible" class="noselect">
+  <svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="patchsvg" overflow="visible" class="noselect">
   </svg>
   <script>
 'use strict';
diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js
index b660e39289ed63a38c2ab1d6a26bebfb1b80b20a..f3f84a583929bbbbfcd3e122b44220573cd2a94f 100644
--- a/pd/nw/pdgui.js
+++ b/pd/nw/pdgui.js
@@ -3576,11 +3576,10 @@ function do_getscroll(cid) {
     var width = bbox.x > 0 ? bbox.x + bbox.width : bbox.width,
         height = bbox.y > 0 ? bbox.y + bbox.height : bbox.height;
     if (width === 0) {
-gui_post("our width is 0");
-        width = patchwin[cid].window.innerWidth;
+        width = patchwin[cid].window.clientWidth;
     }
     if (height === 0) {
-        height = patchwin[cid].window.innerHeight;
+        height = patchwin[cid].window.clientHeight;
     }
     configure_item(svg, {
         viewBox: [bbox.x > 0 ? 0 : bbox.x,