From b28d7faf5b57d5852bc2540c36d38c04db4e20f0 Mon Sep 17 00:00:00 2001 From: bordun Date: Thu, 15 Apr 2021 11:22:21 +0200 Subject: [PATCH] input: display issue when resizing the window --- CHANGELOG.md | 1 + src/client/widgets/basics/input.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e75f3ed7..0309880b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - bug fixes - remote-root option not applied on resources loaded by the client app (css images, etc) + - input: display issue when resizing the window - editor - context menu: add `export` action to export a widget as a fragment file diff --git a/src/client/widgets/basics/input.js b/src/client/widgets/basics/input.js index a70e62e7..8d171499 100644 --- a/src/client/widgets/basics/input.js +++ b/src/client/widgets/basics/input.js @@ -117,6 +117,13 @@ class Input extends Canvas { resizeHandle(event){ + if (this.fontSize && event.height !== this.fontSize) { + // little hack to prevent flex layout issues + // alternate fix is to set css 'height: 100%;' on the canvas element + // but it produces a big drawing context for just one line of text. + event.height = this.fontSize + } + super.resizeHandle(event) // if (this.getProp('vertical')){