From d49266ad90246fcf90565de8ccdcdbad492de0fe Mon Sep 17 00:00:00 2001 From: Ben Thomson Date: Sat, 25 Jul 2020 22:52:23 +0800 Subject: [PATCH] Make popup textarea HTML5-compliant in Inspector editor. Previously, this was a self-closing tag with a value attribute. Neither are supported for the textarea tag in HTML5. It appears that browsers now are actually checking this and/or won't work with it. Fixes #5222. --- modules/system/assets/ui/js/inspector.editor.text.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/system/assets/ui/js/inspector.editor.text.js b/modules/system/assets/ui/js/inspector.editor.text.js index 27d812880..2c9572ec9 100644 --- a/modules/system/assets/ui/js/inspector.editor.text.js +++ b/modules/system/assets/ui/js/inspector.editor.text.js @@ -14,7 +14,7 @@ TextEditor.prototype.constructor = Base TextEditor.prototype.setLinkText = function(link, value) { - var value = value !== undefined ? value + var value = value !== undefined ? value : this.inspector.getPropertyValue(this.propertyDefinition.property) if (value === undefined) { @@ -24,7 +24,7 @@ if (!value) { value = this.propertyDefinition.placeholder $.oc.foundation.element.addClass(link, 'placeholder') - } + } else { $.oc.foundation.element.removeClass(link, 'placeholder') } @@ -47,7 +47,8 @@ \