From 86fb73ccadd12ac07fea7a162295b287d6651c48 Mon Sep 17 00:00:00 2001
From: Bob Zeleznik <zzzman@gmail.com>
Date: Tue, 23 Apr 2019 21:24:57 -0400
Subject: fixes for text box input and dock view problems.

---
 src/client/views/collections/CollectionDockingView.tsx | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'src/client/views/collections/CollectionDockingView.tsx')

diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index 1ea18ed42..84159635a 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -326,8 +326,14 @@ export class DockedFrameRenderer extends React.Component<DockedFrameProps> {
         Server.GetField(this.props.documentId, action((f: Opt<Field>) => this._document = f as Document));
     }
 
-    nativeWidth = () => this._document!.GetNumber(KeyStore.NativeWidth, this._panelWidth);
-    nativeHeight = () => this._document!.GetNumber(KeyStore.NativeHeight, this._panelHeight);
+    nativeWidth = () => {
+        let pw = this._document!.GetNumber(KeyStore.NativeWidth, 0);
+        return pw ? pw : this._panelWidth;
+    }
+    nativeHeight = () => {
+        let pw = this._document!.GetNumber(KeyStore.NativeHeight, 0);
+        return pw ? pw : this._panelHeight;
+    }
     contentScaling = () => {
         let wscale = this._panelWidth / (this.nativeWidth() ? this.nativeWidth() : this._panelWidth);
         if (wscale * this.nativeHeight() > this._panelHeight)
-- 
cgit v1.2.3-70-g09d2

