From 867d7412bcc2995769a0b1b20f55d6b3ed64f13d Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 2 Aug 2017 13:14:19 +0200 Subject: [PATCH] input: bypass resize handler on focus (width=0) to avoid glitches --- src/browser/js/app/widgets/inputs/input.js | 9 +++++++-- src/browser/scss/widgets/_inputs.scss | 3 +-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/browser/js/app/widgets/inputs/input.js b/src/browser/js/app/widgets/inputs/input.js index f17b4e11..8384b787 100644 --- a/src/browser/js/app/widgets/inputs/input.js +++ b/src/browser/js/app/widgets/inputs/input.js @@ -52,8 +52,6 @@ module.exports = class Input extends _canvas_base { super({...options, html: html}) - this.scalin - this.value = '' this.stringValue = '' @@ -72,6 +70,12 @@ module.exports = class Input extends _canvas_base { } + resizeHandle() { + + super.resizeHandle(...arguments) + + } + focus() { this.canvas.attr('tabindex','-1') @@ -86,6 +90,7 @@ module.exports = class Input extends _canvas_base { if (e.keyCode==13) this.blur() if (e.keyCode==27) this.blur(false) }) + } blur(change=true) { diff --git a/src/browser/scss/widgets/_inputs.scss b/src/browser/scss/widgets/_inputs.scss index fa1cbf77..8aac2402 100644 --- a/src/browser/scss/widgets/_inputs.scss +++ b/src/browser/scss/widgets/_inputs.scss @@ -47,9 +47,8 @@ width: 100%; } input + canvas { - // visibility:hidden; - // position: absolute; display: none; + width: 0; }