From d0923104980f0478a77b8afc4ea2ad8fbf312393 Mon Sep 17 00:00:00 2001 From: Ali Abid Date: Thu, 24 Sep 2020 09:27:50 -0700 Subject: [PATCH] fix one line interpretation --- build/lib/gradio/static/js/interfaces/input/textbox.js | 3 ++- gradio/static/js/interfaces/input/textbox.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build/lib/gradio/static/js/interfaces/input/textbox.js b/build/lib/gradio/static/js/interfaces/input/textbox.js index a4627bdc95..0f58b69816 100644 --- a/build/lib/gradio/static/js/interfaces/input/textbox.js +++ b/build/lib/gradio/static/js/interfaces/input/textbox.js @@ -8,7 +8,8 @@ const textbox_input = { if (opts.lines > 1) { this.target.find(".input_text").attr("rows", opts.lines).css("height", "auto"); } else { - this.target.html(this.one_line_html); + this.target.find("textarea").remove(); + this.target.prepend(this.one_line_html); } if (opts.placeholder) { this.target.find(".input_text").attr("placeholder", opts.placeholder) diff --git a/gradio/static/js/interfaces/input/textbox.js b/gradio/static/js/interfaces/input/textbox.js index a4627bdc95..0f58b69816 100644 --- a/gradio/static/js/interfaces/input/textbox.js +++ b/gradio/static/js/interfaces/input/textbox.js @@ -8,7 +8,8 @@ const textbox_input = { if (opts.lines > 1) { this.target.find(".input_text").attr("rows", opts.lines).css("height", "auto"); } else { - this.target.html(this.one_line_html); + this.target.find("textarea").remove(); + this.target.prepend(this.one_line_html); } if (opts.placeholder) { this.target.find(".input_text").attr("placeholder", opts.placeholder)