From 05d84c733c8d364ce80c2068ff675587501beab2 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 16 Jul 2017 17:21:37 -0700 Subject: [PATCH] Add
 to the types that get textarea inste of input.

---
 frontends/etiquette_flask/static/common.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/frontends/etiquette_flask/static/common.js b/frontends/etiquette_flask/static/common.js
index 2ca1997..371445a 100644
--- a/frontends/etiquette_flask/static/common.js
+++ b/frontends/etiquette_flask/static/common.js
@@ -1,3 +1,5 @@
+var PARAGRAPH_TYPES = new Set(["P", "PRE"]);
+
 function Editor(elements, on_open, on_save, on_cancel)
 {
     /*
@@ -102,7 +104,7 @@ function Editor(elements, on_open, on_save, on_cancel)
     {
         var display_element = elements[index];
         var edit_element;
-        if (display_element.tagName == "P")
+        if (PARAGRAPH_TYPES.has(display_element.tagName))
         {
             edit_element = document.createElement("textarea");
             edit_element.rows = 6;